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

Bus load analysis should take virtual buses into account #2205

Closed
lwrage opened this issue Feb 19, 2020 · 44 comments · Fixed by #2249
Closed

Bus load analysis should take virtual buses into account #2205

lwrage opened this issue Feb 19, 2020 · 44 comments · Fixed by #2249
Assignees
Milestone

Comments

@lwrage
Copy link
Contributor

lwrage commented Feb 19, 2020

Summary

The bus load analysis ignores virtual bus components. They should be treated like buses to allow partitioning of a physical bus into channels with their own bandwidth capacities.

Environment

  • OSATE Version: 2.7.0
  • Operating System: all
@AaronGreenhouse
Copy link
Contributor

Is there an example of any sort for bus load analysis?

@AaronGreenhouse
Copy link
Contributor

From @lwrage:

  • The idea is that each (virtual) bus B has a bandwidth capacity and every connection or virtual bus bound to it consumes part of B. Obviously the sum must be less than B. This is for each (virtual) bus in the system.
  • Now there is budgeting vs. actual. If 2 virtual buses are bound to a bus the sum of theis bandwidth capacities should be less than the bandwidth of the bus.
  • Then there is the actual bandwidth needed by connections bound (directly or indirectly) to these 2 virtual buses. The sum of these actual demands must be less than the bandwidth of the bus. (Warning vs. error.)

This is similar to the weight budgets.

Note that a virtual bus A contained in another (virtual) bus B as a subcomponent is for this analysis equivalent to A being bound to B. (edited)

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Mar 19, 2020

Need test cases:

  • connections bound to a simple bus
    • simple connections
      • good (actual < budget < bus capacity)
      • warning (actual > budget, actual < bus capacity) (budget < actual < capacity)
      • bad (actual < budget, budget > bus capacity, actual < capacity)
      • bad (actual > budget, actual > bus capacity, budget < capacity)
      • bad (actual > budget, actual > bus capacity, budget > capacity)
    • Virtual bus
      • VB okay, fits on bus
        • VB as subcomponent
        • VB uses property association
      • VB overloaded, but VB fits on bus
        • VB as subcomponent
        • VB uses property association
      • VB overloaded, doesn't fit on bus
        • VB as subcomponent
        • VB uses property association
      • VB okay, but doesn't fit on bus
        • VB as subcomponent
        • VB uses property association

@AaronGreenhouse
Copy link
Contributor

Whats the diff between SEI.Data_Rate and SEI.Message_Rate?

Also are they made obsolete by Communication_Properties.Output_Rate?

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Mar 19, 2020

Never mind, I see OUTPUT_RATE is handled.

@AaronGreenhouse
Copy link
Contributor

I'm confused about how or if feature groups are processed. I see code in calcBandwidthKBytesps() that looks for child features of features and checks that things make sense. But, how can this happen when we don't create feature group connections per se, but expand out all the connections.

@AaronGreenhouse
Copy link
Contributor

There are currently "warnings" that appear in the report notes. Not all of these are reporting as warnings on the instance model. Should they be? In particular, there is not warning marker generated when a connection actual bandwidth is greater than the connection's budgeted bandwidth, but there is a note in the report.

@AaronGreenhouse
Copy link
Contributor

First set of test cases

package Connections_Regular_Bus
public
	with SEI;

	data D1
		properties
			Data_Size => 8 Bytes;
	end D1;

	data D2
		properties
			Data_Size => 16 Bytes;
	end D2;

	data D3
		properties
			Data_Size => 24 Bytes;
	end D3;

	system S1
		features
			out1: out data port D1;
			in2: in data port D2;
			out3: out data port D3;
	end S1;

	system S2
		features
			in1: in data port D1;
			out2: out data port D2;
			in3: in data port D3;
	end S2;

	bus B
	end B;

	system Top
	end Top;

	system implementation Top.simple
		subcomponents
			sub1: system S1;
			sub2: system S2;
			theBus: bus B;
		connections
			conn1: port sub1.out1 -> sub2.in1 {
				Actual_Connection_Binding => (reference (theBus));
			};
			conn2: port sub2.out2 -> sub1.in2 {
				Actual_Connection_Binding => (reference (theBus));
			};
			conn3: port sub1.out3 -> sub2.in3 {
				Actual_Connection_Binding => (reference (theBus));
			};
	end Top.simple;

	system implementation Top.actualLessThanBudgetLessThanCapacity extends Top.simple
		properties
			-- Budgets 10, 20, 48
			-- Actuals 8, 16, 24

			-- Capacity 96
			-- total budget 78
			-- total actual 48			
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub2.out2;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out3;

			SEI::BandWidthBudget => 10.0 kbytesps applies to conn1;
			SEI::BandWidthBudget => 20.0 kbytesps applies to conn2;
			SEI::BandWidthBudget => 48.0 kbytesps applies to conn3;
			
			SEI::BandWidthCapacity => 96.0 kbytesps applies to theBus;				
	end Top.actualLessThanBudgetLessThanCapacity;

	system implementation Top.actualGreaterThanBudgetLessThanCapacity extends Top.simple
		properties
			-- Budgets 4, 20, 16
			-- Actuals 8, 16, 24

			-- Capacity 96
			-- total budget 40
			-- total actual 48			
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub2.out2;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out3;

			SEI::BandWidthBudget => 4.0 kbytesps applies to conn1;
			SEI::BandWidthBudget => 20.0 kbytesps applies to conn2; -- leave this one okay just for fun
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn3;
			
			SEI::BandWidthCapacity => 96.0 kbytesps applies to theBus;				
	end Top.actualGreaterThanBudgetLessThanCapacity;

	system implementation Top.actualLessThanBudget_budgetGreaterThanCapacity_actualLessThanCapacity extends Top.actualLessThanBudgetLessThanCapacity
		properties
			-- Budgets 10, 20, 48
			-- Actuals 8, 16, 24

			-- Capacity 64
			-- total budget 78
			-- total actual 48			
			SEI::BandWidthCapacity => 64.0 kbytesps applies to theBus;				
	end Top.actualLessThanBudget_budgetGreaterThanCapacity_actualLessThanCapacity;

	system implementation Top.actualGreaterThanBudget_actualGreaterThanCapacity_budgetLessThanCapacity extends Top.simple
		properties
			-- Budgets 4, 20, 16
			-- Actuals 8, 16, 24

			-- Capacity 42
			-- total budget 40
			-- total actual 52			
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub2.out2;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out3;

			SEI::BandWidthBudget => 4.0 kbytesps applies to conn1;
			SEI::BandWidthBudget => 20.0 kbytesps applies to conn2; -- leave this one okay just for fun
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn3;
			
			SEI::BandWidthCapacity => 42.0 kbytesps applies to theBus;				
	end Top.actualGreaterThanBudget_actualGreaterThanCapacity_budgetLessThanCapacity;

	system implementation Top.actualGreaterThanBudget_actualGreaterThanCapacity_budgetGreaterThanCapacity extends Top.simple
		properties
			-- Budgets 4, 20, 16
			-- Actuals 8, 16, 24

			-- Capacity 32
			-- total budget 40
			-- total actual 52			
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub2.out2;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out3;

			SEI::BandWidthBudget => 4.0 kbytesps applies to conn1;
			SEI::BandWidthBudget => 20.0 kbytesps applies to conn2; -- leave this one okay just for fun
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn3;
			
			SEI::BandWidthCapacity => 32.0 kbytesps applies to theBus;				
	end Top.actualGreaterThanBudget_actualGreaterThanCapacity_budgetGreaterThanCapacity;
end Connections_Regular_Bus;

I noticed that if the actual bandwidths of the connections exceeds the budgeted bandwidths for the connections, and their total exceeds the bus capacity, there is of course an error. But what is not checked in this case if whether the total budgets for the connections also exceeds the bus capacity. I suppose you could argue that it is irrelevant at this point, but it seems like it should also be reported.

@lwrage lwrage modified the milestones: 2.7.1, 2.8.0 Mar 20, 2020
@AaronGreenhouse
Copy link
Contributor

Going to create a simple virtual bus example at first so that I can the analysis going.

@AaronGreenhouse
Copy link
Contributor

Okay, feature group issue moves to #2246

@AaronGreenhouse
Copy link
Contributor

Basic examples for virtual bus. He we have a single connection bound to a virtual bus, and the bus bound to an actual bus. There are two versions of each example, one with the virtual bus as a subcomponent of the bus and one with the virtual bus bound using a property association.

package VB
public
	with SEI;

	data D1
		properties
			Data_Size => 8 Bytes;
	end D1;

	system S1
		features
			out1: out data port D1;
	end S1;

	system S2
		features
			in1: in data port D1;
	end S2;
	
	virtual bus VB
	end VB;

	bus B
	end B;

	bus implementation B.nestedVB
		subcomponents
			virtualBus: virtual bus VB;
	end B.nestedVB;

	system Top
	end Top;

	system implementation Top.basic
		subcomponents
			sub1: system S1;
			sub2: system S2;
			theBus: bus B;
		connections
			conn1: port sub1.out1 -> sub2.in1;
	end Top.basic;
	
	-- Virtual bus as subcomponent of bus
	
	system implementation Top.nestedVB_basic extends Top.basic
		subcomponents
			theBus: refined to bus B.nestedVB;
		properties
			Actual_Connection_Binding => (reference (theBus.virtualBus)) applies to conn1;
	end Top.nestedVB_basic;

	system implementation Top.nestedVB_allGood extends Top.nestedVB_basic
		properties
			-- Connection: 8 KBps out of 16KBps budget
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn1;
			
			-- VB: 24 KBps budget
			SEI::BandWidthBudget => 24.0 kbytesps applies to theBus.virtualBus;				
			
			-- Physical bus: 32.0 KBps
			SEI::BandWidthCapacity => 32.0 kbytesps applies to theBus;				
	end Top.nestedVB_allGood;

	system implementation Top.nestedVB_VBOverloaded_BusOkay extends Top.nestedVB_basic
		properties
			-- Connection: 8 KBps out of 16KBps budget
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn1;
			
			-- VB: 12 KBps budget
			SEI::BandWidthBudget => 12.0 kbytesps applies to theBus.virtualBus;				
			
			-- Physical bus: 32.0 KBps
			SEI::BandWidthCapacity => 32.0 kbytesps applies to theBus;				
	end Top.nestedVB_VBOverloaded_BusOkay;

	system implementation Top.nestedVB_VBOverloaded_BusOverloaded extends Top.nestedVB_basic
		properties
			-- Connection: 8 KBps out of 16KBps budget
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn1;
			
			-- VB: 12.0 KBps budget
			SEI::BandWidthBudget => 12.0 kbytesps applies to theBus.virtualBus;				
			
			-- Physical bus: 10.0 KBps
			SEI::BandWidthCapacity => 10.0 kbytesps applies to theBus;				
	end Top.nestedVB_VBOverloaded_BusOverloaded;
	
	system implementation Top.nestedVB_VBOkay_BusOverloaded extends Top.nestedVB_basic
		properties
			-- Connection: 8 KBps out of 16KBps budget
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn1;
			
			-- VB: 24 KBps budget
			SEI::BandWidthBudget => 24.0 kbytesps applies to theBus.virtualBus;				
			
			-- Physical bus: 20.0 KBps
			SEI::BandWidthCapacity => 20.0 kbytesps applies to theBus;				
	end Top.nestedVB_VBOkay_BusOverloaded;
	
	-- Virtual bus bound to bus via property association
	
	system implementation Top.boundVB_basic extends Top.basic
		subcomponents
			virtualBus: virtual bus VB;
		properties
			Actual_Connection_Binding => (reference (theBus)) applies to virtualBus;
			Actual_Connection_Binding => (reference (virtualBus)) applies to conn1;
	end Top.boundVB_basic;

	system implementation Top.boundVB_allGood extends Top.boundVB_basic
		properties
			-- Connection: 8 KBps out of 16KBps budget
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn1;
			
			-- VB: 24 KBps budget
			SEI::BandWidthBudget => 24.0 kbytesps applies to virtualBus;				
			
			-- Physical bus: 32.0 KBps
			SEI::BandWidthCapacity => 32.0 kbytesps applies to theBus;				
	end Top.boundVB_allGood;

	system implementation Top.boundVB_VBOverloaded_BusOkay extends Top.boundVB_basic
		properties
			-- Connection: 8 KBps out of 16KBps budget
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn1;
			
			-- VB: 12 KBps budget
			SEI::BandWidthBudget => 12.0 kbytesps applies to virtualBus;				
			
			-- Physical bus: 32.0 KBps
			SEI::BandWidthCapacity => 32.0 kbytesps applies to theBus;				
	end Top.boundVB_VBOverloaded_BusOkay;

	system implementation Top.boundVB_VBOverloaded_BusOverloaded extends Top.boundVB_basic
		properties
			-- Connection: 8 KBps out of 16KBps budget
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn1;
			
			-- VB: 12.0 KBps budget
			SEI::BandWidthBudget => 12.0 kbytesps applies to virtualBus;				
			
			-- Physical bus: 10.0 KBps
			SEI::BandWidthCapacity => 10.0 kbytesps applies to theBus;				
	end Top.boundVB_VBOverloaded_BusOverloaded;
	
	system implementation Top.boundVB_VBOkay_BusOverloaded extends Top.boundVB_basic
		properties
			-- Connection: 8 KBps out of 16KBps budget
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			SEI::BandWidthBudget => 16.0 kbytesps applies to conn1;
			
			-- VB: 24 KBps budget
			SEI::BandWidthBudget => 24.0 kbytesps applies to virtualBus;				
			
			-- Physical bus: 20.0 KBps
			SEI::BandWidthCapacity => 20.0 kbytesps applies to theBus;				
	end Top.boundVB_VBOkay_BusOverloaded;

end VB;

@AaronGreenhouse
Copy link
Contributor

Checked in some changes on Friday. So far they seem to be working when checked with the above models.

Need a more complicated example with

  • Mix of connections and virtual buses
  • Nested and explicitly bound virtual bus
  • multiple of each

@AaronGreenhouse
Copy link
Contributor

More complicated example:

package Complicated
public
	with SEI;

	-- Some basics
	
	data D8
		properties
			Data_Size => 8 Bytes;
	end D8;
	
	data D16
		properties
			Data_Size => 16 Bytes;
	end D16;
	
	data D24
		properties
			Data_Size => 24 Bytes;
	end D24;

	-- Virtual buses
	
	virtual bus VB_CAP16
	end VB_CAP16;
	
	virtual bus implementation VB_CAP16.i
		properties
			SEI::BandWidthBudget => 16.0 kbytesps;
	end VB_CAP16.i;

	virtual bus VB_CAP64
	end VB_CAP64;

	virtual bus implementation VB_CAP64.i
		subcomponents
			vb2: virtual bus VB_CAP16.i {
				-- property is inherited, so we want to make sure we explicitly clear it here
				Actual_Connection_Binding => ();
			};
		properties
			SEI::BandWidthBudget => 64.0 kbytesps;
	end VB_CAP64.i;
	
	virtual bus VB_CAP8
	end VB_CAP8;

	virtual bus implementation VB_CAP8.i
		properties
			SEI::BandWidthBudget => 8.0 kbytesps;
	end VB_CAP8.i;
	
	-- physical bus
	
	bus B_CAP128
	end B_CAP128;

	bus implementation B_CAP128.i
		subcomponents
			vb4: virtual bus VB_CAP8.i {
				-- property is inherited, so we want to make sure we explicitly clear it here
				Actual_Connection_Binding => ();
			};
		properties
			SEI::BandWidthCapacity => 128.0 kbytesps;
	end B_CAP128.i;
	
	-- communicating components
	
	system S1
		features
			out1: out data port D8;
			out2: out data port D8;
			out3: out data port D8;
			out4: out data port D16;
			out5: out data port D24;
			out6: out data port D8;
			out7: out data port D8;
			out8: out data port D24;
			out9: out data port D24;
	end S1;

	system S2
		features
			in1: in data port D8;
			in2: in data port D8;
			in3: in data port D8;
			in4: in data port D16;
			in5: in data port D24;
			in6: in data port D8;
			in7: in data port D8;
			in8: in data port D24;
			in9: in data port D24;
	end S2;

	-- assesmbled system
	
	system top
	end top;
	
	system implementation top.i
		subcomponents
			sub1: system s1;
			sub2: system s2;
			theBus: bus B_CAP128.i;
			vb1: virtual bus VB_CAP16.i;
			vb3: virtual bus VB_CAP64.i;
		connections
			conn1: port sub1.out1 -> sub2.in1;
			conn2: port sub1.out2 -> sub2.in2;
			conn3: port sub1.out3 -> sub2.in3;
			conn4: port sub1.out4 -> sub2.in4;
			conn5: port sub1.out5 -> sub2.in5;
			conn6: port sub1.out6 -> sub2.in6;
			conn7: port sub1.out7 -> sub2.in7;
			conn8: port sub1.out8 -> sub2.in8;
			conn9: port sub1.out9 -> sub2.in9;
		properties
			-- Bind the remaining virtual buses
			Actual_Connection_Binding => (reference (vb3)) applies to vb1;			
			Actual_Connection_Binding => (reference (theBus)) applies to vb3;
			
			-- Bind the connections
			Actual_Connection_Binding => (reference (vb1)) applies to conn1;		
			Actual_Connection_Binding => (reference (vb1)) applies to conn2;
					
			Actual_Connection_Binding => (reference (vb3.vb2)) applies to conn3;		
			Actual_Connection_Binding => (reference (vb3.vb2)) applies to conn4;
					
			Actual_Connection_Binding => (reference (vb3)) applies to conn5;
					
			Actual_Connection_Binding => (reference (theBus.vb4)) applies to conn6;		
			Actual_Connection_Binding => (reference (theBus.vb4)) applies to conn7;
					
			Actual_Connection_Binding => (reference (theBus)) applies to conn8;		
			Actual_Connection_Binding => (reference (theBus)) applies to conn9;
			
			-- Communication rates
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out2;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out3;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out4;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out5;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out6;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out7;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out8;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out9;
	end top.i;
end Complicated;

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Mar 23, 2020

I'm not really sure how to draw a picture for the above, but I'm going to give a hierarchical breakdown of it.

  • There are two systems and there are 9 connections going between them. I am going to list the connections under the bus (physical or virtual) that they are bound to.
    • Physical bus theBus. Has a capacity of 128 KB/s.
      • Connection conn8 with actual data rate of 24 KB/s.
      • Connection conn9 with actual data rate of 24 KB/s.
      • Virtual bus theBus.vb4 is a subcomponent of theBus. Has a capacity of 8 KB/s.
        • Connection conn6 with actual data rate of 8 KB/s.
        • Connection conn7 with actual data rate of 8 KB/s.
      • Virtual bus vb3 is bound to theBus by a property association. Has a budget of 64 KB/s.
        • Connection conn5 with actual data rate of 24 KB/s.
        • Virtual bus vb1 is bound to vb3 by a property association. Has a budget of 16 KB/s.
          • Connection conn1 with actual data rate of 8 KB/s.
          • Connection conn2 with actual data rate of 8 KB/s.
        • Virtual bus vb3.vb2 is a subcomponent of vb3. Has a budget of 16 KB/s.
          • Connection conn3 with actual data rate of 8 KB/s.
          • Connection conn4 with actual data rate of 16 KB/s.

Results

  • The bus vb2 is overloaded, it needs 24 KB/s but the budget is only 16 KB/s.
  • The bus vb4 is overloaded, it needs 16 KB/s but the budget is only 8 KB/s.

Note

  • The demand on vb3 from vb2 is 16 KB/s because that is its declared budget (from the property association).
  • The demand on theBus from vb4 is 8 KB/s because that is its declared budget (from the property association).

@AaronGreenhouse
Copy link
Contributor

Generated result file looks like:

Screen Shot 2020-03-23 at 3.08.09 PM.png

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Mar 24, 2020

After discussion with @lwrage, we have decided that a more sophisticated implementation is required. In particular, analysis should consider the data overhead introduced by buses and virtual buses. This requires that the analysis have a more complete model of the bus and connection hierarchy. Once we have this, analysis can also produce more readable results.

Other changes

  • Physical buses should be allowed to have SEI::BandWidthBudget
  • Virtual buses should be allowed to have SEI::BandWidthCapacity
  • Budget should always be less than capacity, otherwise there is an error.
  • Actual should be less than budget.
    • budget < actual < capacity is a warning
    • capacity < actual is an error
    • actual is computed as follows
      • connection: data size (see below) * data rate if available, otherwise the bandwidth budget
      • (virtual) bus: sum of "actual" of each directly bound connection and (virtual) bus, otherwise the bandwidth budget if there are no bound connections or virtual buses.
  • Data overheads are added recursively along the hierarchy. The overhead is expressed by the Data_Size property on each (virtual) bus. The base data size for each connection is taken from the Data_Size property of the feature at the start of the connection.

Need to think more about how broadcast should be affected by virtual buses.

Need to rewrite the help text and put it in a useful place.

@AaronGreenhouse
Copy link
Contributor

Okay, first step is to build a model of the bus–connection hierarchy. This should not be too hard. (Famous last words?)

@AaronGreenhouse
Copy link
Contributor

I'm just going to start the analysis from scratch and cut and paste as necessary. Right now I'm creating "New Bus Load Analysis" and we'll kill the old one and rename the new one when we are done.

@AaronGreenhouse
Copy link
Contributor

Also per @lwrage, now is a good time to update the analysis to use the analysis results objects.

Basically this this analysis is getting a complete rewrite.

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Mar 25, 2020

Model building is done.

Now to analyze based on the model.

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Mar 26, 2020

After discussion with @lwrage again, we have revised the above.

  • Analysis will compute the actual bandwidth used at each node.
  • Any (virtual) bus or connection without a budget gets a warning.
  • For each connection
    • The computed bandwidth (data (with overhead) * rate) must be less than the budget, otherwise error.
  • Analysis will check for each (virtual) bus
    • budget must not be greater than capacity
    • The sum of the budgets for each child bus and connection must be less than the bus's budget, otherwise error.
    • The sum of the actual of each child must be less than the bus's capacity, otherwise error

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Mar 27, 2020

Revise the test models:

  • Test data overhead
    • bus -> vb -> vb -> vb
    • connections at each step to "observe" the overhead
  • Test connection
    • Missing budget
    • actual < budget
    • actual > budget
  • Test bus
    • Missing capacity
    • Missing budget
    • Missing both
    • budget < capacity
    • budget > capacity
    • required budget < budget
    • required budget > budget
    • actual < capacity
    • actual > capacity
  • Test virtual bus
    • Missing capacity
    • Missing budget
    • Missing both
    • budget < capacity
    • budget > capacity
    • required budget < budget
    • required budget > budget
    • actual < capacity
    • actual > capacity

@AaronGreenhouse
Copy link
Contributor

Basic analysis seems to be working. Just prints to the console right now. Going to test it more (see above). Then fix it to use AnalysisResult objects and markers.

@AaronGreenhouse
Copy link
Contributor

Test case for data overhead

package TestDataOverhead
public
	with SEI;

	-- Some basics
	
	data D8
		properties
			Data_Size => 8 Bytes;
	end D8;
	
	-- buses
	
	bus MyBus
		properties
			Data_Size => 8 Bytes;
			SEI::BandWidthBudget => 512.0 KBytesps;
			SEI::BandWidthCapacity => 768.0 KBytesps;
	end MyBus;

	virtual bus MyVB1
		properties
			Data_Size => 16 Bytes;  -- total overhead will be 24
			SEI::BandWidthBudget => 384.0 KBytesps;
			SEI::BandWidthCapacity => 512.0 KBytesps;
	end MyVB1;

	virtual bus MyVB2
		properties
			Data_Size => 24 Bytes; -- total overhead will be 48
			SEI::BandWidthBudget => 256.0 KBytesps;
			SEI::BandWidthCapacity => 384.0 KBytesps;
	end MyVB2;

	virtual bus MyVB3
		properties
			Data_Size => 32 Bytes; -- total overhead will be 80
			SEI::BandWidthBudget => 128.0 KBytesps;
			SEI::BandWidthCapacity => 256.0 KBytesps;
	end MyVB3;
	
	system S1
		features
			out1: out data port D8;
			out2: out data port D8;
			out3: out data port D8;
			out4: out data port D8;
	end S1;

	system S2
		features
			in1: in data port D8;
			in2: in data port D8;
			in3: in data port D8;
			in4: in data port D8;
	end S2;

	-- assembled system
	
	system top
	end top;
	
	system implementation top.i
		subcomponents
			sub1: system s1;
			sub2: system s2;
			theBus: bus MyBus;
			VB1: virtual bus MyVB1;
			VB2: virtual bus MyVB2;
			VB3: virtual bus MyVB3;
		connections
			conn1: port sub1.out1 -> sub2.in1 {
				Actual_Connection_Binding => (reference (theBus));
				SEI::BandWidthBudget => 20.0 KBytesps;
				-- actual will be 16
			};
			conn2: port sub1.out2 -> sub2.in2 {
				Actual_Connection_Binding => (reference (VB1));
				SEI::BandWidthBudget => 40.0 KBytesps;
				-- actual will be 32
			};
			conn3: port sub1.out3 -> sub2.in3 {
				Actual_Connection_Binding => (reference (VB2));
				SEI::BandWidthBudget => 64.0 KBytesps;
				-- actual will be 56
			};
			conn4: port sub1.out4 -> sub2.in4 {
				Actual_Connection_Binding => (reference (VB3));
				SEI::BandWidthBudget => 96.0 KBytesps;
				-- actual will be 88
			};
		properties
			-- Bind the remaining virtual buses
			Actual_Connection_Binding => (reference (theBus)) applies to vb1;			
			Actual_Connection_Binding => (reference (vb1)) applies to vb2;			
			Actual_Connection_Binding => (reference (vb2)) applies to vb3;			
			
			-- Communication rates
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out2;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out3;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out4;
	end top.i;
end TestDataOverhead;

@AaronGreenhouse
Copy link
Contributor

Testing connections

package TestConnections
public
	with SEI;

	-- Some basics
	
	data D8
		properties
			Data_Size => 8 Bytes;
	end D8;
	
	data D16
		properties
			Data_Size => 16 Bytes;
	end D16;
	
	data D24
		properties
			Data_Size => 24 Bytes;
	end D24;

	-- bus
	
	bus B
		properties
			SEI::BandWidthBudget => 64.0 KBytesps;
			SEI::BandwidthCapacity => 96.0 KBytesps;
	end B;


	-- communicating components
	
	system S1
		features
			out1: out data port D8;
			out2: out data port D16;
			out3: out data port D24;
	end S1;

	system S2
		features
			in1: in data port D8;
			in2: in data port D16;
			in3: in data port D24;
	end S2;

	-- assembled system
	
	system top
	end top;
	
	system implementation top.i
		subcomponents
			sub1: system s1;
			sub2: system s2;
			theBus: bus B;
		connections
			-- No budget
			conn1: port sub1.out1 -> sub2.in1;
			conn2: port sub1.out2 -> sub2.in2 {
				-- budget is too small
				SEI::BandWidthBudget => 8.0 KBytesps;
			};
			conn3: port sub1.out3 -> sub2.in3 {
				-- budget is okay
				SEI::BandWidthBudget => 32.0 KBytesps;
			};
		properties
			-- Bind the connections
			Actual_Connection_Binding => (reference (theBus)) applies to conn1;		
			Actual_Connection_Binding => (reference (theBus)) applies to conn2;
			Actual_Connection_Binding => (reference (theBus)) applies to conn3;		
			
			-- Communication rates
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out2;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out3;
	end top.i;
end TestConnections;

@AaronGreenhouse
Copy link
Contributor

Testing just the capacity vs. budget properties on buses and virtual buses

package TestBusProperties
public
	with SEI;

	-- Some basics
	
	data D8
		properties
			Data_Size => 8 Bytes;
	end D8;
	
	-- buses
	
	bus MyBus
	end MyBus;

	virtual bus MyVB1
	end MyVB1;

	
	system S1
		features
			out1: out data port D8;
	end S1;

	system S2
		features
			in1: in data port D8;
	end S2;

	-- assembled system
	
	system top
	end top;
	
	system implementation top.noCapacity_noBudget
		subcomponents
			sub1: system s1;
			sub2: system s2;
			theBus: bus MyBus;
			VB1: virtual bus MyVB1;
		connections
			conn1: port sub1.out1 -> sub2.in1 {
				Actual_Connection_Binding => (reference (VB1));
				SEI::BandWidthBudget => 16.0 KBytesps;
			};
		properties
			-- Bind the remaining virtual buses
			Actual_Connection_Binding => (reference (theBus)) applies to vb1;			
			
			-- Communication rates
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
	end top.noCapacity_noBudget;
	
	system implementation top.noCapacity extends top.noCapacity_noBudget
		properties
			SEI::BandWidthBudget => 32.0 KBytesps applies to VB1;
			SEI::BandWidthBudget => 48.0 KBytesps applies to theBus;
	end top.noCapacity;
	
	system implementation top.noBudget extends top.noCapacity_noBudget
		properties
			SEI::BandWidthCapacity => 48.0 KBytesps applies to VB1;
			SEI::BandWidthCapacity => 64.0 KBytesps applies to theBus;
	end top.noBudget;
	
	system implementation top.budgetLessThanCapacity extends top.noCapacity_noBudget
		properties
			SEI::BandWidthBudget => 32.0 KBytesps applies to VB1;
			SEI::BandWidthCapacity => 48.0 KBytesps applies to VB1;

			SEI::BandWidthBudget => 48.0 KBytesps applies to theBus;
			SEI::BandWidthCapacity => 64.0 KBytesps applies to theBus;
	end top.budgetLessThanCapacity;

	system implementation top.budgetGreaterThanCapacity extends top.noCapacity_noBudget
		properties
			SEI::BandWidthBudget => 32.0 KBytesps applies to VB1;
			SEI::BandWidthCapacity => 24.0 KBytesps applies to VB1;

			SEI::BandWidthBudget => 56.0 KBytesps applies to theBus;
			SEI::BandWidthCapacity => 48.0 KBytesps applies to theBus;
	end top.budgetGreaterThanCapacity;
end TestBusProperties;

@AaronGreenhouse
Copy link
Contributor

(So far all the tests above have been good: I haven't need to change the analysis code.)

@AaronGreenhouse
Copy link
Contributor

Final set of tests

package TestCalculations
public
	with SEI;

	-- Some basics
	
	data D8
		properties
			Data_Size => 8 Bytes;
	end D8;
	
	-- communicating components
	
	system S1
		features
			out1: out data port D8;
			out2: out data port D8;
			out3: out data port D8;
	end S1;

	system S2
		features
			in1: in data port D8;
			in2: in data port D8;
			in3: in data port D8;
	end S2;
	
	-- buses
	
	bus b		
	end b;

	virtual bus vb
	end vb;

	-- assembled system
	
	system top
	end top;
	
	system implementation top.i
		subcomponents
			sub1: system s1;
			sub2: system s2;
			theBus: bus b;
			vb1: virtual bus vb;
		connections
			conn1: port sub1.out1 -> sub2.in1 {
				SEI::BandWidthBudget => 12.0 KBytesps;
			};
			conn2: port sub1.out2 -> sub2.in2 {
				SEI::BandWidthBudget => 12.0 KBytesps;
			};
			conn3: port sub1.out3 -> sub2.in3 {
				SEI::BandWidthBudget => 12.0 KBytesps;
			};
		properties
			-- Bind the remaining virtual buses
			Actual_Connection_Binding => (reference (theBus)) applies to vb1;			
			
			-- Bind the connections
			Actual_Connection_Binding => (reference (vb1)) applies to conn1;		
			Actual_Connection_Binding => (reference (vb1)) applies to conn2;
					
			Actual_Connection_Binding => (reference (theBus)) applies to conn3;		
			
			-- Communication rates
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out2;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out3;
	end top.i;
	
	system implementation top.requiredBudgetLessThanBudget extends top.i
		properties
			SEI::BandWidthCapacity => 48.0 KBytesps applies to vb1;
			SEI::BandWidthBudget => 32.0 KBytesps applies to vb1;

			SEI::BandWidthCapacity => 64.0 KBytesps applies to theBus;
			SEI::BandWidthBudget => 48.0 KBytesps applies to theBus;
	end top.requiredBudgetLessThanBudget;
	
	system implementation top.requiredBudgetGreaterThanBudget extends top.i
		properties
			SEI::BandWidthCapacity => 48.0 KBytesps applies to vb1;
			SEI::BandWidthBudget => 16.0 KBytesps applies to vb1;

			SEI::BandWidthCapacity => 64.0 KBytesps applies to theBus;
			SEI::BandWidthBudget => 24.0 KBytesps applies to theBus;
	end top.requiredBudgetGreaterThanBudget;
	
	system implementation top.actualGreaterThanCapacity extends top.i
		properties
			SEI::BandWidthCapacity => 12.0 KBytesps applies to vb1;
			SEI::BandWidthBudget => 12.0 KBytesps applies to vb1;

			SEI::BandWidthCapacity => 16.0 KBytesps applies to theBus;
			SEI::BandWidthBudget => 16.0 KBytesps applies to theBus;
	end top.actualGreaterThanCapacity;
end TestCalculations;

All seems good

@AaronGreenhouse
Copy link
Contributor

Added markers.

@AaronGreenhouse
Copy link
Contributor

I didn't do the markers correctly. Now that I'm looking at how to create the AnalysisResult objects, I see the markers should come from the result's diagnostics.

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Mar 30, 2020

Format for the AnalysisResult tree:

AnalysisResult

  • analysis = "Bus Load"
  • modelElement = SystemInstance being analyzed
  • resultType = SUCCESS
  • message = "Bus load analysis of "`
  • diagnostics = empty list
  • parameters = empty list
  • results = one Result for each system operation mode
    • modelElement = SystemOperationMode instance object
    • resultType = SUCCESS
    • message = "" if the SOM is null or the empty som, otherwise "(xxx, ..., yyy)"
    • values = empty list
    • diagnostics = empty list
    • subResults = one Result for each ComponentInstance with category of Bus
      • modelElement =ComponentInstance instance object
      • resultType = SUCCESS
      • message = The component's name from getName()
      • values[0] = The capacity of the bus in KB/s as specified by the SEI::BandwidthCapacity property (RealValue)
      • values[1] = The budget of the bus in KB/s as specified by the SEI::BandwidthBudget property (RealValue)
      • values[2] = The required budget of the bus in KB/s (the sum of the budgets of all the bound buses and connections) (RealValue)
      • values[3] = The actual usage of the bus in KB/s (the sum of the actual usages of all the bound buses and connections) (RealValue)
      • values[4] = The number of virtual buses bound to this bus (IntegerValue)
      • values[5] = The number of connections bound to this bus (IntegerValue)
      • diagnostics = Diagnostics associated with this bus.
      • subResults = indexes 0 through (values[4] -1) refer to Result objects for virtual buses.
        • Result objects for virtual buses are the same as for buses
      • subResults = indexes values[4] through values[4] + values[5] - 1) refer to Result objects for connections.
        • modelElement =ConnectionInstance instance object
        • resultType = SUCCESS
        • message = The connection's name from geName()
        • values[0] = The budget of the connection in KB/s as specified by the SEI::BandwidthBudget property (RealValue)
        • values[1] = The actual usage of the bus in KB/s as computed by the multiplying the connection's data size by the connection's message rate. This takes into account any messaging overhead by the bus hierarchy the connection is bound to. (RealValue)
        • diagnostics = Diagnostics associated with this connection
        • subResults = empty list

@AaronGreenhouse
Copy link
Contributor

Generation of AnalysisResult and Result objects is in.

Generation of CSV file is in.

  • Handles som
  • handles diagnostics

Markers are generated from results and labeled with the SOM.

Next step is to clean up the implementation:

  • Progress Monitor
  • Jobs/threads (Avoid AaxlReadOnlyHandlerAsJob)
  • Methods for programmatically invoking
  • Anything that can be abstracted from the current implementation to reuse in the future?

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Mar 31, 2020

Rewrote the handler to avoid using AaxlReadOnlyHandlerAsJob. Created a new abstract superclass that is not public at this time. Need more experience with other analyses before it can be put to general use.

Analysis handler supports the selection of multiple instance models in the same was as the Reinstantiate command. Tries to set up the resource locking to maximize the amount of parallelism available to the independent analysis jobs.

Remaining tasks:

  1. Set up to be programmatically invokable
  2. Create Junit tests
  3. Remove the old analysis, and fix the plugin.xml
  4. Help text description of output format

@AaronGreenhouse
Copy link
Contributor

I cannot get rid of the old BusLoadAnalysisHandler because it is extended by the deprecated class DoBoundSwitchBandWidthAnalysis.

@AaronGreenhouse
Copy link
Contributor

Remaining tasks:

  1. Create Junit tests
  2. Help text description of output format

@AaronGreenhouse
Copy link
Contributor

JUnit test are it. Had to create org.osate.analysis.resources.budget.tests. Had some problems with that, but it's okay now.

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Apr 6, 2020

Still to do:

  • Documentation
  • put the __BuslLoad extension on the output file
  • Test the "tab separated" file on Excel
  • Test the broadcast flag (totally forgot about this).
    • May need to update the output record connections ignored due to the broadcast

@AaronGreenhouse
Copy link
Contributor

To make the tab-separated columns work in Excel (and work better in Numbers), I need to make the first line of the output file

Sep=\t

Where \t here is the tab character, not the literal string "\t"

@AaronGreenhouse
Copy link
Contributor

Changed the output file to end with __BusLoad.csv

@AaronGreenhouse
Copy link
Contributor

Switched the output file format again. Back to comma-separated, but using quoted data elements.

This works in Excel, Numbers, and LibreOffice.

@AaronGreenhouse
Copy link
Contributor

Created a broadcast example:

package TestBroadcast
public
	with SEI;

	-- Some basics
	
	data D8
		properties
			Data_Size => 8 Bytes;
	end D8;

	-- bus
	
	bus B
		properties
			SEI::BandWidthBudget => 64.0 KBytesps;
			SEI::BandwidthCapacity => 96.0 KBytesps;
	end B;


	-- communicating components
	
	system S1
		features
			out1: out data port D8;
	end S1;

	system S2
		features
			in1: in data port D8;
			in2: in data port D8;
			in3: in data port D8;
	end S2;

	-- assembled system
	
	system top
	end top;
	
	system implementation top.i
		subcomponents
			sub1: system s1;
			sub2: system s2;
			noBroadcastBus: bus B;
			
			sub3: system s1;
			sub4: system s2;
			broadcastBus: bus B {
				SEI::Broadcast_Protocol => true;
			};
		connections
			conn1: port sub1.out1 -> sub2.in1 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (noBroadcastBus));
			};
			conn2: port sub1.out1 -> sub2.in2 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (noBroadcastBus));
			};
			conn3: port sub1.out1 -> sub2.in3 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (noBroadcastBus));
			};
			
			conn4: port sub1.out1 -> sub2.in1 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
			conn5: port sub1.out1 -> sub2.in2 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
			conn6: port sub1.out1 -> sub2.in3 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
		properties			-- Communication rates
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub3.out1;
	end top.i;
end TestBroadcast;

We expect that

  • For the bus noBroadcastBus there are three connections and an actual usage of 24Kb/s
  • For the bus broadcastBus there is only one connection (the first one) and an actual usage of 8KB/s.

Problem, the results do not show the connections that are merged into the broadcast.

@AaronGreenhouse
Copy link
Contributor

A bigger example, three groups of connections that merged due to broadcast:

package TestBiggerBroadcast
public
	with SEI;

	-- Some basics
	
	data D8
		properties
			Data_Size => 8 Bytes;
	end D8;

	-- bus
	
	bus B
		properties
			SEI::BandWidthBudget => 64.0 KBytesps;
			SEI::BandwidthCapacity => 96.0 KBytesps;
	end B;


	-- communicating components
	
	system S1
		features
			out1: out data port D8;
	end S1;

	system S2
		features
			in1: in data port D8;
			in2: in data port D8;
			in3: in data port D8;
	end S2;

	-- assembled system
	
	system top
	end top;
	
	system implementation top.i
		subcomponents
			sub1: system s1;
			sub2: system s2;
			noBroadcastBus: bus B;
			
			sub3a: system s1;
			sub3b: system s1;
			sub3c: system s1;
			sub4a: system s2;
			sub4b: system s2;
			sub4c: system s2;
			broadcastBus: bus B {
				SEI::Broadcast_Protocol => true;
			};
		connections
			conn1: port sub1.out1 -> sub2.in1 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (noBroadcastBus));
			};
			conn2: port sub1.out1 -> sub2.in2 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (noBroadcastBus));
			};
			conn3: port sub1.out1 -> sub2.in3 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (noBroadcastBus));
			};
			
			conn4a: port sub3a.out1 -> sub4a.in1 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
			conn5a: port sub3a.out1 -> sub4b.in1 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
			conn6a: port sub3a.out1 -> sub4c.in1 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
			
			conn4b: port sub3b.out1 -> sub4a.in2 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
			conn5b: port sub3b.out1 -> sub4b.in2 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
			conn6b: port sub3b.out1 -> sub4c.in2 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
			
			conn4c: port sub3c.out1 -> sub4a.in3 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
			conn5c: port sub3c.out1 -> sub4b.in3 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
			conn6c: port sub3c.out1 -> sub4c.in3 {
				SEI::BandWidthBudget => 8.0 KBytesps;
				Actual_Connection_Binding => (reference (broadcastBus));
			};
		properties			-- Communication rates
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub1.out1;
			
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub3a.out1;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub3b.out1;
			Communication_Properties::Output_Rate => [Value_Range => 800.0 .. 1000.0; Rate_Unit => PerSecond;] applies to sub3c.out1;
	end top.i;
end TestBiggerBroadcast;

We expect that

  • For the bus noBroadcastBus there are three connections and an actual usage of 24Kb/s
  • For the bus broadcastBus there are three connections (the first one from each group) and an actual usage of 24KB/s.

Here we see even more the importance of marking the connections that are part of a broadcast.

This needs to be incorporated into the model. Going to need to update BusLoadModel.filterSameSourceConnections() to deal with this.

@AaronGreenhouse
Copy link
Contributor

Updated the analysis to group together broadcasts in the results. This affected the structure of the result tree in the output. I have updated the JavaDoc. I have added JUnit tests for this.

TODO: Help docs

@AaronGreenhouse
Copy link
Contributor

Added help txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants