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

Feature/NVMulator #369

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

Feature/NVMulator #369

wants to merge 2 commits into from

Conversation

sajjadtamimi
Copy link

No description provided.

@sajjadtamimi sajjadtamimi requested a review from cahz July 17, 2023 13:12
Copy link
Member

@cahz cahz left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution. I have a couple of change requests related to the toolflow part. Someone else needs to look at the runtime changes.

return false
}

proc add_nvmulator {} {
Copy link
Member

Choose a reason for hiding this comment

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

This needs to accept arguments and pass it through

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for your review.
Done.

Comment on lines 36 to 54
connect_bd_net [get_bd_pins /memory/mig/c0_ddr4_ui_clk] [get_bd_pins /memory/NVEmulator_0/CLK]
connect_bd_net [get_bd_pins /memory/mem_peripheral_aresetn] [get_bd_pins /memory/NVEmulator_0/RST_N]


puts "Adding NVMulator 0 programmer: memory-side"
delete_bd_objs [get_bd_intf_nets /memory/mig_ic_M00_AXI]
connect_bd_intf_net [get_bd_intf_pins /memory/NVEmulator_0/M_AXI_MIG] [get_bd_intf_pins /memory/mig/C0_DDR4_S_AXI]
connect_bd_intf_net [get_bd_intf_pins /memory/mig_ic/M00_AXI] [get_bd_intf_pins /memory/NVEmulator_0/S_AXI_NV]

puts "Connecting NVMulator programmer: memory-side"
create_bd_cell -type ip -vlnv xilinx.com:ip:smartconnect:1.0 /memory/smartconnect_0
set_property -dict [list CONFIG.NUM_CLKS {2} CONFIG.NUM_MI {1} CONFIG.NUM_SI {1}] [get_bd_cells /memory/smartconnect_0]
connect_bd_net [get_bd_pins /memory/smartconnect_0/aclk] [get_bd_pins /memory/mig/c0_ddr4_ui_clk]
connect_bd_net [get_bd_pins /memory/smartconnect_0/aclk1] [get_bd_pins /memory/design_clk]
connect_bd_net [get_bd_pins /memory/mem_peripheral_aresetn] [get_bd_pins /memory/smartconnect_0/aresetn]
current_bd_instance "/memory"
set s_nvm [create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:aximm_rtl:1.0 "S_NVM"]
connect_bd_intf_net [get_bd_intf_pins /memory/S_NVM] [get_bd_intf_pins /memory/smartconnect_0/S00_AXI]
connect_bd_intf_net [get_bd_intf_pins /memory/smartconnect_0/M00_AXI] [get_bd_intf_pins /memory/NVEmulator_0/S_AXI]
Copy link
Member

Choose a reason for hiding this comment

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

This is not portable and has too many assumptions on port names. It will only work on the Alveo U280. In the current form, the plugin should not be under platform/common but instead restricted to U280.

Copy link
Author

Choose a reason for hiding this comment

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

I made it general. I tried it on AU250 and the plugin was able to integrate NVMulator as expected.

exit 1
}

save_bd_design
Copy link
Member

Choose a reason for hiding this comment

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

Please remove debugging commands such as save_bd_design

Copy link
Author

Choose a reason for hiding this comment

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

Done

puts "Connecting NVMulator programmer: host to memory"
connect_bd_intf_net [get_bd_intf_pins /host/M_NVM] [get_bd_intf_pins /memory/S_NVM]

current_bd_instance
Copy link
Member

Choose a reason for hiding this comment

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

does this command have any function when used without parameter?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it uses default value (i.e., 0 for read_latency and write_latency).

Copy link
Member

Choose a reason for hiding this comment

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

I was refering to the current_bd_instance

Copy link
Author

Choose a reason for hiding this comment

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

I see. I also updated input for current_bd_instance


current_bd_instance
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Indentation is off

Copy link
Author

Choose a reason for hiding this comment

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

Done

namespace eval nvmulator {

proc is_nvmulator_supported {} {
puts "AU280"
Copy link
Member

Choose a reason for hiding this comment

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

This output is not meaningful. Either leave it out or add more context.

Copy link
Author

Choose a reason for hiding this comment

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

I removed it.

@wirthjohannes
Copy link
Collaborator

wirthjohannes commented Jul 19, 2023

I had a short look at the runtime changes.
In my opinion these changes should not be in the "standard" runtime, as they are very specific to this NVMulator (which probably won't be used by most people). This is not specific to this change, but a general problem with the runtime, especially as we don't have an equivalent to e.g. the features in the toolflow.
But I still think, that we shouldn't just continue always adding such specific changes to the general runtime. Especially when this probably can be achieved with less specific changes to the runtime, or maybe none at all.

If I understand it correctly, the changes to the runtime basically just configure the NVMulator IP (via an AXI-Lite slave), correct?

I want to propose some alternatives, on how to achieve this:

  1. Add the NVMulator IP to the PEs configured for your composition with a special PE_ID. Then you could just configure it via the existing launch() calls. While this is somewhat hacky, but it would require no changes to the runtime at all.
  2. Extend the runtime with an option to "write" to platform components (or at least some of them). Something like configure_platform_component(string component_name, uint64_t offset, uint64_t data) (and the other direction query_platform_component). This would look at the components specified in the status core and find the correct one via the name. While this of course requires changes to the runtime, they would not be specific to the NVMulator, but also useful for other stuff (e.g. querying ECC status information).

@cahz
Copy link
Member

cahz commented Mar 26, 2024

Is there any progress on this PR? I agree with the suggestions of @wirthjohannes, we need a more general approach to get this PR merged.

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

3 participants