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

pwm_gen_tb: Add tb for axi_pwm_gen #57

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

pwm_gen_tb: Add tb for axi_pwm_gen #57

wants to merge 2 commits into from

Conversation

alin724
Copy link
Collaborator

@alin724 alin724 commented Nov 12, 2023

  • pwm_gen_tb - configuration task - configure period, width, offset of different channels;
  • HDL repo PR;

$display("[%t] axi_pwm_gen started.", $time);
#100000;

axi_write (`AXI_PWMGEN + 32'h00000010, 'h2); // stop PWM_GEN
Copy link
Contributor

Choose a reason for hiding this comment

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

'h2 should be changed to 'h1. 'h2 loads the current configuration.

Copy link
Collaborator

@StancaPop StancaPop Feb 7, 2024

Choose a reason for hiding this comment

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

Also, shouldn't we use the following format instead of manually setting the address?

axi_write (AXI_PWMGEN + GetAddrs(REG_RSTN), SET_REG_RSTN_RESET(1));

.pwm_gen_o_13 (pwm_gen_o_13),
.pwm_gen_o_14 (pwm_gen_o_14),
.pwm_gen_o_15 (pwm_gen_o_15),

Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove extra line.

input pwm_gen_o_13,
input pwm_gen_o_14,
input pwm_gen_o_15,

Copy link
Collaborator

Choose a reason for hiding this comment

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

Extra line


task test_config;
begin
#100 axi_write (`AXI_PWMGEN + GetAddrs(REG_RSTN), `SET_REG_RSTN_RESET(0)); // PWM_GEN reset in regmap (ACTIVE HIGH)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The #100 delays can be removed in all these axi writes, as they do not affect the functionality and are not mandatory.

@IstvanZsSzekely IstvanZsSzekely added the new New testbench label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new New testbench
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants