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

Change tvip_axi_data typedef from bit to logic to handle 4-state value #31

Closed

Conversation

kazt81
Copy link
Contributor

@kazt81 kazt81 commented Oct 15, 2021

@taichi-ishitani This PR is related to #29. This change makes RAL adapter return UVM_HAS_X if read data contains X or Z value.

@taichi-ishitani
Copy link
Owner

These TBs use tvip-axi.

I'd like you to confirm your change does not break the above TBs.

@taichi-ishitani taichi-ishitani self-assigned this Oct 15, 2021
@kazt81
Copy link
Contributor Author

kazt81 commented Oct 15, 2021

On the latest commit on tnoc / rggen-sample-testbench, test cannot be run with Cadence Xcelium 21.03. As far as I checked, tests can be run on the following commit:
taichi-ishitani/tnoc@63168a0
rggen/rggen-sample-testbench@ccd973c
If there's anything I'm missing for running test, please let me know.

According to the commit of rggen below with this PR:
rggen/rggen-sample-testbench@ccd973c
I've confirmed tests are successfully done with no UVM_ERROR/UVM_FATAL.

Thanks.

@taichi-ishitani
Copy link
Owner

On the latest commit on tnoc / rggen-sample-testbench, test cannot be run with Cadence Xcelium 21.03.

What is happened? Something compile error?
Can you put log files?

@kazt81
Copy link
Contributor Author

kazt81 commented Oct 15, 2021

There are some compilation errors with the latest commits at these repositories:
rggen-sample-testbench_sim_axi4lite_systemverilog_compile.log
tnoc_sim_fabric_data_width_256_vc_1_xmvlog.log

@taichi-ishitani
Copy link
Owner

Thank you for uploading log files.
In addition:

  • Can you open tickets to report these errors on each projects?
  • Can you report these errors to Cadence? I think Xcelium's bug causes these errors because VCS can compile these code. You can send these TBs to Cadence for reproducing errors.

TVIP_AXI_SLAVE_ERROR: return UVM_NOT_OK;
TVIP_AXI_DECODE_ERROR: return UVM_NOT_OK;
endcase
if (axi_item.response[0] inside {TVIP_AXI_SLAVE_ERROR, TVIP_AXI_SLAVE_ERROR})
Copy link
Owner

Choose a reason for hiding this comment

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

Please add begin/end block to if statement to follow my coding rule.

Copy link
Owner

Choose a reason for hiding this comment

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

I think we should return UVM_HAX_X when response[0] is unknown. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

UVM 1.2 defines UVM_HAS_X as Operation completed successfully bit had unknown bits so my opinion is that it should be treated as UVM_NOT_OK if response[0] contains undefined value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Current implementation response is also defined as bit type so we don't need to care the case when response is undefined state. However, in the future, if response type is changed to logic, it needs to be revisited.

@@ -68,7 +68,7 @@ package tvip_axi_types_pkg;
TVIP_AXI_WRAPPING_BURST = 'b10
} tvip_axi_burst_type;

typedef bit [`TVIP_AXI_MAX_DATA_WIDTH-1:0] tvip_axi_data;
typedef logic [`TVIP_AXI_MAX_DATA_WIDTH-1:0] tvip_axi_data;
Copy link
Owner

Choose a reason for hiding this comment

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

Can you change other types from bit to logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can be done and ideally signals at Interface boundary should have capability to handle 4-state value. However, VIP internal code needs to care these as 4-state value so it may take some time and effort. I don't think changing bit to logic may be so valuable at the moment.
Anyway, let me check if this should be done in this PR or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this PR, I want to minimize the difference and I think changing all types of interface to logic is not so valuable at the moment, so signal types other than data should be left as bit.

@taichi-ishitani
Copy link
Owner

I've changed data type of AXI signals and RAL adapter according to your proposal.

Sorry for delay response.

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.

None yet

2 participants