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

Loading contents of BRAM #560

Open
grahamnaylorccfe opened this issue Feb 22, 2023 · 1 comment
Open

Loading contents of BRAM #560

grahamnaylorccfe opened this issue Feb 22, 2023 · 1 comment

Comments

@grahamnaylorccfe
Copy link

Writing to BRAM seems quite slow.
I have a 64k BRAM (16k x 4 byte) memory but using driver.set_IQBRAM() takes about 440ms to complete:

#For this to send data to the IQBRAM, the 32 bit data needs to be pre-loaded into eg driver.IQdata numpy array
def set_IQBRAM(self):
@command()
def set_IQBRAM_data(self, data):
pass
set_IQBRAM_data(self, self.IQBRAM)

Any ideas on how to speed this up?

@rsarwar87
Copy link
Contributor

Hi Graham, the speed is probably slow because of the for loop and the TCP latancy related to each call.

You could write all the data in one go and see if that helps

template<typename T, size_t N, uint32_t offset = 0>
    void write_array(const std::array<T, N>& arr, uint32_t block_idx = 0)

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

No branches or pull requests

2 participants