Skip to content

Commit

Permalink
Use protected as a heading for a number of declarations.
Browse files Browse the repository at this point in the history
I believe that the previous formatting in Digitial is due to someone having
protected A
protected B
protected C
(which would be another style).
Then the subsequent protected were lost, and first protected formatted on a separate line.
  • Loading branch information
HansOlsson committed Jan 11, 2024
1 parent eaec24d commit 2b643d4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
3 changes: 1 addition & 2 deletions Modelica/Clocked/RealSignals/TimeBasedSources/Sine.mo
Expand Up @@ -10,8 +10,7 @@ block Sine "Generate sine signal"
"Output = offset for time < startTime";
protected
constant Real pi=Modelica.Constants.pi;
protected
SI.Time simTime;
SI.Time simTime;
equation
simTime = sample(time);
y = offset + (if simTime < startTime then 0 else amplitude*
Expand Down
42 changes: 19 additions & 23 deletions Modelica/Electrical/Digital.mo
Expand Up @@ -6112,9 +6112,9 @@ NC = no change
annotation (Placement(transformation(extent={{80,-20},{100,0}}),
iconTransformation(extent={{80,-20},{100,0}})));
protected
D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL,y(start=L.'U', fixed=true));
D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL,y(start=L.'U', fixed=true));
algorithm
nextstate := T.NXferTable[enable, x];
yy := nextstate;
Expand Down Expand Up @@ -6194,9 +6194,9 @@ UX: if dataIn == U then U else X
annotation (Placement(transformation(extent={{80,-20},{100,0}}),
iconTransformation(extent={{80,-20},{100,0}})));
protected
D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U', fixed=true));
D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U', fixed=true));
algorithm
nextstate := T.NRXferTable[enable, x];
yy := nextstate;
Expand Down Expand Up @@ -6276,9 +6276,9 @@ Strength Reduced: 0 -> L, 1 -> H, X -> W
annotation (Placement(transformation(extent={{80,-20},{100,0}}),
iconTransformation(extent={{80,-20},{100,0}})));
protected
D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL);
D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL);
algorithm
nextstate := T.PXferTable[enable, x];
yy := nextstate;
Expand Down Expand Up @@ -6357,8 +6357,7 @@ UX: if dataIn == U then U else X
D.Interfaces.DigitalOutput y
annotation (Placement(transformation(extent={{80,-20},{100,0}}),
iconTransformation(extent={{80,-20},{100,0}})));
protected
D.Interfaces.Logic nextstate(start=L.'U');
protected D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL);
algorithm
Expand Down Expand Up @@ -6439,8 +6438,7 @@ UX: if dataIn == U then U else X
D.Interfaces.DigitalOutput y
annotation (Placement(transformation(extent={{80,-20},{100,0}}),
iconTransformation(extent={{80,-20},{100,0}})));
protected
D.Interfaces.Logic nextstate(start=L.'U');
protected D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U', fixed=true));
algorithm
Expand Down Expand Up @@ -6518,8 +6516,7 @@ DataOut*: Strength map for DataOut according to tristate table Buf3sTable
D.Interfaces.DigitalOutput y
annotation (Placement(transformation(extent={{80,-20},{100,0}}),
iconTransformation(extent={{80,-20},{100,0}})));
protected
D.Interfaces.Logic nextstate(start=L.'U');
protected D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL);
algorithm
Expand Down Expand Up @@ -6597,8 +6594,7 @@ DataOut*: Strength map for DataOut according to tristate table Buf3slTable
D.Interfaces.DigitalOutput y
annotation (Placement(transformation(extent={{80,-20},{100,0}}),
iconTransformation(extent={{80,-20},{100,0}})));
protected
D.Interfaces.Logic nextstate(start=L.'U');
protected D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U',fixed=true));
algorithm
Expand Down Expand Up @@ -6682,9 +6678,9 @@ DataOut*: Strength map for DataOut according to tristate table Buf3sTable
annotation (Placement(transformation(extent={{80,-20},{100,0}}),
iconTransformation(extent={{80,-20},{100,0}})));
protected
D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL);
D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL);
algorithm
nextstate := T.Buf3sTable[strength, T.UX01Conv[T.NotTable[enable]], T.UX01Conv[T.NotTable[x]]];
yy := nextstate;
Expand Down Expand Up @@ -7004,9 +7000,9 @@ Z = L.'Z'
iconTransformation(extent={{80,-10},{100,10}})));

protected
D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U',fixed=true));
D.Interfaces.Logic nextstate(start=L.'U');
D.Interfaces.DigitalOutput yy(start=L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U',fixed=true));

algorithm
nextstate := T.MUX2x1Table[T.UX01Conv[in1], T.UX01Conv[sel], T.UX01Conv[in0]];
Expand Down

0 comments on commit 2b643d4

Please sign in to comment.