Skip to content

Conversation

@IstvanZsSzekely
Copy link
Collaborator

@IstvanZsSzekely IstvanZsSzekely commented Jun 4, 2025

PR Description

Updated timeunit and timeprecision to 1ns / 1ps and removed the `timescale directive from the simulation files to avoid confusion and weird simulation behavior.
Updated logger to print ps time as fraction to ns for more accurate logging. The logging message timestamps will be more precise.
Updated test programs to support new time scaling. Since the old format was ns/ps, the current testbenches that don't have time fraction specified for delays (# 10 for example), will automatically use the new ps/fs format, and because of it, they wouldn't work correctly. Instead of waiting for 10 ns, they would wait for 10 ps.

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • New test (change that adds new test program and/or testbench)
  • Breaking change (has dependencies in other repositories/testbenches)
  • Documentation (change that adds or modifies documentation)

PR Checklist

  • I have followed the code style guidelines
  • I have performed a self-review of changes
  • I have ran all testbenches affected by this PR
  • I have commented my code, at least hard-to-understand parts
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe files, Copyright etc)
  • I have not introduced new Warnings/Errors on compilation/elaboration/simulation
  • I have set the verbosity level to none for the test program

- Updated timescale and precision to 1ps / 1fs
- Updated logger to print ps time as fraction to ns for more accurate logging
- Removed time scale and precision related commands
- Updated test programs to support new time scaling

Signed-off-by: Istvan-Zsolt Szekely <istvan.szekely@analog.com>
@IstvanZsSzekely IstvanZsSzekely self-assigned this Jun 4, 2025
@IstvanZsSzekely IstvanZsSzekely requested a review from a team as a code owner June 4, 2025 08:59
@IstvanZsSzekely IstvanZsSzekely added the update Update current feature label Jun 4, 2025
- Reverted the timescaling back to the original 1ns/1ps
- Added system_project level option to change simulation timescale
- Added logger time format option

Signed-off-by: Istvan-Zsolt Szekely <istvan.szekely@analog.com>
Copy link
Contributor

@LBFFilho LBFFilho left a comment

Choose a reason for hiding this comment

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

It looks good, but it fails spi_engine's test_sleep_delay. This is caused by the axi_clkgen now needing a lot more time before it generates a valid output clock, and test_sleep_delay doesn't wait the adequate time.

This was the axi_clkgen time before the PR:
Screenshot 2025-06-13 105234

This is after the PR:
image

Both pictures from test_program, which actually passes, because test_sleep_delay is not patient enough for us to see the clock.

I suppose other time-sensitive tests can have similar problems.

I guess a simple fix is just to make it wait more (or better yet make it wait for a specific condition ie. cmd_ready), but I think it's probably better to also fix the clock generator extra delay.

@IstvanZsSzekely
Copy link
Collaborator Author

It looks good, but it fails spi_engine's test_sleep_delay. This is caused by the axi_clkgen now needing a lot more time before it generates a valid output clock, and test_sleep_delay doesn't wait the adequate time.

This was the axi_clkgen time before the PR: Screenshot 2025-06-13 105234

This is after the PR: image

Both pictures from test_program, which actually passes, because test_sleep_delay is not patient enough for us to see the clock.

I suppose other time-sensitive tests can have similar problems.

I guess a simple fix is just to make it wait more (or better yet make it wait for a specific condition ie. cmd_ready), but I think it's probably better to also fix the clock generator extra delay.

Thank you for letting me know! I'll look into it and come up with a solution.

@IstvanZsSzekely IstvanZsSzekely marked this pull request as draft June 17, 2025 08:01
- Removed system_project level option to change simulation timescale
- Added a global timescale directive to avoid any warnings
- Added timeunit and timeprecision to each test program

Signed-off-by: Istvan-Zsolt Szekely <istvan.szekely@analog.com>
@IstvanZsSzekely IstvanZsSzekely marked this pull request as ready for review June 18, 2025 07:13
@IstvanZsSzekely IstvanZsSzekely requested a review from LBFFilho June 18, 2025 07:13
@IstvanZsSzekely IstvanZsSzekely merged commit 9d25e09 into main Jun 26, 2025
2 checks passed
@IstvanZsSzekely IstvanZsSzekely deleted the update_timescale branch June 26, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

update Update current feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants