cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
354 Views
Registered: ‎09-13-2018

Multi AXI Lite commands but one to execute

I am trying to get an HLS module that spits a bunch of test data out.

I have >= 5 axi lite interfaces connected to 32 bit pointers and i update them with axi lite writes.  But i do not want the algo in the body to work on the new parameters until the last axi lite write occurs. 

I feel like this a common thing, but i cannot find a way to acomplish this double buffering.  All of my attempts result in the config flowing to the algo immediately when I write them.

void test1(hls::stream<uint32_tc> &outStream, uint32_tc* config1, uint32_tc* config2,
			uint32_tc* config3, uint32_tc* config4, uint32_tc* config5) {

	bool done = false;
	bool outValid = false;
	uint32_tc config5_old = 0x00;
	uint32_tc config1_store = 0;
	uint32_tc config2_store = 0;
	uint32_tc config3_store = 0;
	uint32_tc config4_store = 0;
	uint32_tc config5_store = 0;

	while (not done) {

		if (config5_old != *config5){
			config1_store = *config1;
			config2_store = *config2;
			config3_store = *config3;
			config4_store = *config4;
			config5_store = *config5;
			outValid = true;
		}

		if (outValid) {
			uint32_tc t1 = (config1_store+config2_store-config3_store+config4_store)*config5_store;
			outStream.write(t1);
		}

	}
}
0 Kudos
2 Replies
Highlighted
Scholar
Scholar
334 Views
Registered: ‎04-26-2015

Re: Multi AXI Lite commands but one to execute

Normally you'd just wait until the block finishes, then do the updates, then start the block again.

0 Kudos
Highlighted
Contributor
Contributor
323 Views
Registered: ‎09-13-2018

Re: Multi AXI Lite commands but one to execute

Sure, but the hang up, I think, is that I want the block to go again with the same parameters if I do not change config5.

Once i start the block, I want a continuous stream of data out.  When i change parameters one at a time, i do not want them to take effect until i write the last parameter.  I want all the configs/parameters to update at once and not affect output of data.

0 Kudos