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

Gpio straps func cov #26009

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcelocarvalhoLowRisc
Copy link

Functional coverage properties included in the gpio_straps_if.sv and some other minor fixes.

@marcelocarvalhoLowRisc marcelocarvalhoLowRisc requested a review from a team as a code owner January 24, 2025 17:45
@marcelocarvalhoLowRisc marcelocarvalhoLowRisc requested review from hcallahan-lowrisc and removed request for a team January 24, 2025 17:45
Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

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

There are a few specific items here, but I think the commit structure also needs sorting out. You can probably do that by rebasing on top of any other PRs that are needed and then squashing together the commits that are unique to this PR.

hw/ip/gpio/dv/env/gpio_env_cov.sv Outdated Show resolved Hide resolved
hw/ip/gpio/dv/env/gpio_env_cov.sv Outdated Show resolved Hide resolved
hw/ip/gpio/dv/env/gpio_env_cov.sv Outdated Show resolved Hide resolved
hw/ip/gpio/dv/env/gpio_env_cov.sv Outdated Show resolved Hide resolved
hw/ip/gpio/dv/env/gpio_env_cov.sv Outdated Show resolved Hide resolved
Comment on lines 12 to 13
+tree tb
+module gpio_straps_if
Copy link
Contributor

Choose a reason for hiding this comment

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

We talked about this in person, but the right way to do this is to add a block-specific configuration file. See rom_ctrl and rv_dm for two examples that do this for VCS.

Choose a reason for hiding this comment

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

fixed

@marcelocarvalhoLowRisc marcelocarvalhoLowRisc force-pushed the gpio_straps_func_cov branch 11 times, most recently from 9d95e6a to 87b277d Compare January 29, 2025 08:32
Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

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

At the moment, I think this includes the changes from the PR that defines the rand straps vseq. I don't think there's any reason that they should be needed for a coverage change. Could you drop them from this PR?

@marcelocarvalhoLowRisc marcelocarvalhoLowRisc force-pushed the gpio_straps_func_cov branch 2 times, most recently from ad99314 to 85ab23a Compare February 3, 2025 09:56
@marcelocarvalhoLowRisc
Copy link
Author

At the moment, I think this includes the changes from the PR that defines the rand straps vseq. I don't think there's any reason that they should be needed for a coverage change. Could you drop them from this PR?

Yes, it's fixed. I droped most of the items, I only kept the strap interface, where it is located the coverage properties.

- Included new file gpio_cover.cfg to add the gpio_straps_if cover
assertions in the database
- Added the configuration file above into the gpio_sim_cfg.hjson
- Included the commit from PR: 25868 about straps verification,
from this point, only needs to review these files:
        - new file:   hw/ip/gpio/dv/cov/gpio_cover.cfg
        - modified:   hw/ip/gpio/dv/gpio_sim_cfg.hjson (Inclusion about
          the gpio_cover.cfg)
        - modified:   hw/ip/gpio/dv/env/gpio_env_cov.sv
        - new file:   hw/ip/gpio/dv/interfaces/gpio_straps_if.sv (New
          cover properties included)

Signed-off-by: Marcelo Carvalho Faleiro de Almeida <[email protected]>
Comment on lines +190 to +193
{
name: gpio_rand_straps
uvm_test_seq: gpio_rand_straps_vseq
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this should be here?

logic strap_en; // Signal to enable straps
gpio_straps_t sampled_straps; // Sampled gpio_i snapshot data from GPIO (DUT)

modport straps_port_in(input clk,
Copy link
Contributor

Choose a reason for hiding this comment

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

I find this sort of thing really hard to understand (not just from you!). Could you add a comment above it that explains who we're expecting to interact through this modport? ("This is the dut's view of the sampled straps" or "This is the way the outside world passes in straps" or ...)

output strap_en,
input sampled_straps);

// Sequence to capture the timing relationship between strap_en and strap_data
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand this. Normally a sequence models a 1-bit value changing over time (as used by a property or assertion). I don't think that sampled_straps.data is this.

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.

2 participants