-
Notifications
You must be signed in to change notification settings - Fork 905
[dv,top_earlgrey] Cleanup on new features #28492
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
base: earlgrey_1.0.0
Are you sure you want to change the base?
[dv,top_earlgrey] Cleanup on new features #28492
Conversation
…ary. Signed-off-by: Harry Callahan <[email protected]>
Signed-off-by: Harry Callahan <[email protected]>
This task can be forked into the background to capture UART console traffic into the test logs. This is useful for observation and sequencing inside logfiles. Signed-off-by: Harry Callahan <[email protected]>
Signed-off-by: Harry Callahan <[email protected]>
This is in support of future tests which will invoke the bootstrapping routine multiple times within a single simulation. Signed-off-by: Harry Callahan <[email protected]>
… tweaks. This contains no functional change within the simulation environment, however noise in the logfile outputs is reduced for developers. Readability is improved significantly by improving formatting and adding full prose comments. Signed-off-by: Harry Callahan <[email protected]>
Improve readability by reformatting nested if-else statements into a case expression. Add comments where needed, while removing unnecessary ones. Signed-off-by: Harry Callahan <[email protected]>
Signed-off-by: Harry Callahan <[email protected]>
…ulus routines Allow for invoking the bootstrap routine multiple times in a single test Signed-off-by: Harry Callahan <[email protected]>
61207c0
to
c5c4d04
Compare
// TODO: support bootstrapping entire flash address space, not just slot A. | ||
`DV_CHECK_FATAL(cfg.sw_images.exists(SwTypeTestSlotA)) | ||
|
||
`uvm_info(`gfn, "SPI-Bootstrapping Flash SlotA...", UVM_MEDIUM) |
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.
Nit: I'd probably put a space in "slot A" here and in the next message.
// (Optionally) Backdoor load memories with pre-built binary images. | ||
|
||
if (!cfg.skip_rom_bkdr_load) begin | ||
`uvm_info(`gfn, "Initializing ROM via backdoor with binary image: cfg.sw_images[SwTypeRom]", UVM_MEDIUM) |
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.
This is triggering a line length warning. Also, wouldn't it be better to give the path, replacing cfg.sw_images[SwTypeRom]
with %0s
?
virtual task spi_device_load_bootstrap(string sw_image); | ||
// Drive the spi_host agent connected to the DUT spi_device according to the ROM Bootstrap | ||
// procedure. | ||
virtual task spi_agent_drive_bootstrap(byte byte_q[$]); |
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.
Since this doesn't get overridden or used anywhere else, maybe drop the "virtual" and make it "local"?
// presented by the ROM. Afterwards, bring the software straps back to 0, | ||
// and issue a power-on reset. | ||
// The `sw_image` path should point to an image usable by the `read_sw_frames` task. | ||
virtual task spi_device_load_bootstrap(string sw_image); |
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.
Since this doesn't get overridden, I'd drop the virtual
. It's also only used from extension classes, so maybe make it protected
?
cfg.chip_vif.sw_straps_if.drive(3'h7); | ||
|
||
`uvm_info(`gfn, "Waiting for DUT ROM to configure spi_device ready for bootstrap...", UVM_LOW) | ||
csr_spinwait( |
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.
Are these stages supposed to be serialized? If not, maybe it would be better to triple the timeout and run the waits in parallel?
Builds on #28491 (ignore first 5 commits shared from this PR) with formatting changes and cleanups to existing testbench code.
Review commit-by-commit. The changes on top should not break existing functionality.
There is some very minor behavioural changes, such as the addition of long timeouts during the bootstrap tasks, but these are inconsequential to existing tests. Most of the diff is improving formatting and adding comments where they were previously missing or incomplete.