CombinedText
stringlengths 4
3.42M
|
|---|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="11">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>duc_imf3</name>
<ret_bitwidth>18</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>x</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>x</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>60</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_2">
<Value>
<Obj>
<type>0</type>
<id>10</id>
<name>x_read</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>x</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>78</item>
<item>79</item>
</oprand_edges>
<opcode>read</opcode>
</item>
<item class_id_reference="9" object_id="_3">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>i_2_load</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>25</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second class_id="12" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="13" tracking_level="0" version="0">
<first class_id="14" tracking_level="0" version="0">
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>25</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>80</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_4">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name>tmp</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>25</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>25</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>81</item>
<item>83</item>
</oprand_edges>
<opcode>icmp</opcode>
</item>
<item class_id_reference="9" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name>in_1_load</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>14</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>25</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>25</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>85</item>
<item>86</item>
<item>87</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>26</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>26</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>88</item>
<item>89</item>
<item>230</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>17</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>27</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>27</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>90</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>19</id>
<name>d_assign</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>d</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>91</item>
<item>92</item>
<item>93</item>
<item>94</item>
</oprand_edges>
<opcode>phi</opcode>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>inc</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>28</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>28</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>inc</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>95</item>
<item>97</item>
</oprand_edges>
<opcode>add</opcode>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>p_Val2_s</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>__Val2__</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>98</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name>ch_4</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>ch</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>100</item>
<item>101</item>
<item>103</item>
</oprand_edges>
<opcode>bitselect</opcode>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>tmp_s</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</oprand_edges>
<opcode>zext</opcode>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>c_1_0_addr</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>105</item>
<item>107</item>
<item>108</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>c_1_0_load</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>c</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>109</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>init_2_load</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>110</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>tmp_14</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>111</item>
<item>113</item>
</oprand_edges>
<opcode>icmp</opcode>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name>or_cond</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>114</item>
<item>115</item>
</oprand_edges>
<opcode>or</opcode>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>29</id>
<name>tmp_7</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>28</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>28</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>117</item>
<item>118</item>
<item>119</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name>tmp_8</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>120</item>
</oprand_edges>
<opcode>zext</opcode>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>31</id>
<name>shift_reg_p0_addr</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>121</item>
<item>122</item>
<item>123</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>32</id>
<name>shift_reg_p0_load</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>124</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>33</id>
<name>tmp_15</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>125</item>
<item>127</item>
<item>128</item>
</oprand_edges>
<opcode>select</opcode>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>34</id>
<name>tmp_i</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>46</lineNumber>
<contextFuncName>mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac</second>
</first>
<second>46</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>36</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>129</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>tmp_i_12</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>46</lineNumber>
<contextFuncName>mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac</second>
</first>
<second>46</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>36</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>130</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>tmp_i_cast</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>46</lineNumber>
<contextFuncName>mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac</second>
</first>
<second>46</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>35</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>131</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>m</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>46</lineNumber>
<contextFuncName>mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac</second>
</first>
<second>46</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>m</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>36</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>132</item>
<item>133</item>
</oprand_edges>
<opcode>mul</opcode>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name>tmp_26_i</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>134</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>39</id>
<name>acc0</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>acc0</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>135</item>
<item>136</item>
</oprand_edges>
<opcode>add</opcode>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>40</id>
<name>c_1_1_addr</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>33</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>137</item>
<item>138</item>
<item>139</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>41</id>
<name>c_1_1_load</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>33</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>c</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>140</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>42</id>
<name>shift_reg_p1_addr</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>33</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>141</item>
<item>142</item>
<item>143</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>43</id>
<name>shift_reg_p1_load</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>33</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>144</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>44</id>
<name>tmp_16</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>33</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>145</item>
<item>146</item>
<item>147</item>
</oprand_edges>
<opcode>select</opcode>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>45</id>
<name>p_shl</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>46</lineNumber>
<contextFuncName>mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>33</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac</second>
</first>
<second>46</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>35</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>149</item>
<item>150</item>
<item>152</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name>mt</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>46</lineNumber>
<contextFuncName>mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>33</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac</second>
</first>
<second>46</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>35</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>153</item>
<item>154</item>
</oprand_edges>
<opcode>sub</opcode>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>47</id>
<name>m_1</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>33</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>m</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>35</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>155</item>
<item>156</item>
<item>158</item>
</oprand_edges>
<opcode>select</opcode>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>48</id>
<name>tmp_26_i6</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>33</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>159</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name>acc1</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>33</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>acc1</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>160</item>
<item>161</item>
</oprand_edges>
<opcode>add</opcode>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>50</id>
<name>tmp_9</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>25</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>25</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>162</item>
<item>163</item>
<item>164</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>51</id>
<name>tmp_10</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>35</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>35</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>165</item>
</oprand_edges>
<opcode>zext</opcode>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name>shift_reg_p0_addr_1</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>35</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>35</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>166</item>
<item>167</item>
<item>168</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>53</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>35</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>35</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>169</item>
<item>170</item>
<item>229</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>54</id>
<name>shift_reg_p1_addr_1</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>171</item>
<item>172</item>
<item>173</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>55</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>174</item>
<item>175</item>
<item>228</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name>tmp_11</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>38</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>38</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>177</item>
<item>178</item>
<item>180</item>
<item>182</item>
</oprand_edges>
<opcode>partselect</opcode>
</item>
<item class_id_reference="9" object_id="_47">
<Value>
<Obj>
<type>0</type>
<id>57</id>
<name>tmp_12</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>38</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>38</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>183</item>
<item>184</item>
<item>185</item>
<item>186</item>
</oprand_edges>
<opcode>partselect</opcode>
</item>
<item class_id_reference="9" object_id="_48">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name>tmp_13</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>38</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>38</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>y</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>187</item>
<item>188</item>
<item>189</item>
</oprand_edges>
<opcode>select</opcode>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>59</id>
<name>tmp_17</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>39</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>190</item>
<item>192</item>
</oprand_edges>
<opcode>icmp</opcode>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</type>
<id>60</id>
<name>or_cond5</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>39</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>193</item>
<item>194</item>
</oprand_edges>
<opcode>and</opcode>
</item>
<item class_id_reference="9" object_id="_51">
<Value>
<Obj>
<type>0</type>
<id>61</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>39</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>195</item>
<item>196</item>
<item>197</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_52">
<Value>
<Obj>
<type>0</type>
<id>63</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>40</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>40</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>199</item>
<item>200</item>
<item>232</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_53">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>40</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>40</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>201</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_54">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>41</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>41</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>202</item>
<item>203</item>
<item>204</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_55">
<Value>
<Obj>
<type>0</type>
<id>68</id>
<name>tmp_18</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>42</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>205</item>
<item>206</item>
</oprand_edges>
<opcode>add</opcode>
</item>
<item class_id_reference="9" object_id="_56">
<Value>
<Obj>
<type>0</type>
<id>69</id>
<name>tmp_19</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>42</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>207</item>
<item>208</item>
<item>209</item>
</oprand_edges>
<opcode>select</opcode>
</item>
<item class_id_reference="9" object_id="_57">
<Value>
<Obj>
<type>0</type>
<id>70</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>42</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>210</item>
<item>211</item>
<item>233</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_58">
<Value>
<Obj>
<type>0</type>
<id>71</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>42</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>212</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_59">
<Value>
<Obj>
<type>0</type>
<id>73</id>
<name>inc_2</name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>44</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>44</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>inc</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>213</item>
<item>214</item>
<item>215</item>
</oprand_edges>
<opcode>select</opcode>
</item>
<item class_id_reference="9" object_id="_60">
<Value>
<Obj>
<type>0</type>
<id>74</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>44</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>44</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>216</item>
<item>217</item>
<item>231</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_61">
<Value>
<Obj>
<type>0</type>
<id>75</id>
<name></name>
<fileName>imf3.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>45</lineNumber>
<contextFuncName>imf3</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>imf3.c</first>
<second>imf3</second>
</first>
<second>45</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>218</item>
</oprand_edges>
<opcode>ret</opcode>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>12</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_62">
<Value>
<Obj>
<type>2</type>
<id>82</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_63">
<Value>
<Obj>
<type>2</type>
<id>96</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_64">
<Value>
<Obj>
<type>2</type>
<id>102</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>3</content>
</item>
<item class_id_reference="16" object_id="_65">
<Value>
<Obj>
<type>2</type>
<id>106</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_66">
<Value>
<Obj>
<type>2</type>
<id>112</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<const_type>0</const_type>
<content>5</content>
</item>
<item class_id_reference="16" object_id="_67">
<Value>
<Obj>
<type>2</type>
<id>126</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_68">
<Value>
<Obj>
<type>2</type>
<id>151</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>17</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_69">
<Value>
<Obj>
<type>2</type>
<id>157</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>35</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_70">
<Value>
<Obj>
<type>2</type>
<id>179</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>17</content>
</item>
<item class_id_reference="16" object_id="_71">
<Value>
<Obj>
<type>2</type>
<id>181</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>34</content>
</item>
<item class_id_reference="16" object_id="_72">
<Value>
<Obj>
<type>2</type>
<id>191</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<const_type>0</const_type>
<content>15</content>
</item>
<item class_id_reference="16" object_id="_73">
<Value>
<Obj>
<type>2</type>
<id>198</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_74">
<Obj>
<type>3</type>
<id>15</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>5</count>
<item_version>0</item_version>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_75">
<Obj>
<type>3</type>
<id>18</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>2</count>
<item_version>0</item_version>
<item>16</item>
<item>17</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_76">
<Obj>
<type>3</type>
<id>62</id>
<name>._crit_edge_ifconv</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>43</count>
<item_version>0</item_version>
<item>19</item>
<item>20</item>
<item>21</item>
<item>22</item>
<item>23</item>
<item>24</item>
<item>25</item>
<item>26</item>
<item>27</item>
<item>28</item>
<item>29</item>
<item>30</item>
<item>31</item>
<item>32</item>
<item>33</item>
<item>34</item>
<item>35</item>
<item>36</item>
<item>37</item>
<item>38</item>
<item>39</item>
<item>40</item>
<item>41</item>
<item>42</item>
<item>43</item>
<item>44</item>
<item>45</item>
<item>46</item>
<item>47</item>
<item>48</item>
<item>49</item>
<item>50</item>
<item>51</item>
<item>52</item>
<item>53</item>
<item>54</item>
<item>55</item>
<item>56</item>
<item>57</item>
<item>58</item>
<item>59</item>
<item>60</item>
<item>61</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_77">
<Obj>
<type>3</type>
<id>65</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>2</count>
<item_version>0</item_version>
<item>63</item>
<item>64</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_78">
<Obj>
<type>3</type>
<id>67</id>
<name>._crit_edge8</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_79">
<Obj>
<type>3</type>
<id>72</id>
<name>._crit_edge10</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>68</item>
<item>69</item>
<item>70</item>
<item>71</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_80">
<Obj>
<type>3</type>
<id>76</id>
<name>._crit_edge9</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>73</item>
<item>74</item>
<item>75</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>133</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_81">
<id>79</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_82">
<id>80</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_83">
<id>81</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_84">
<id>83</id>
<edge_type>1</edge_type>
<source_obj>82</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_85">
<id>84</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_86">
<id>85</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>14</sink_obj>
</item>
<item class_id_reference="20" object_id="_87">
<id>86</id>
<edge_type>2</edge_type>
<source_obj>62</source_obj>
<sink_obj>14</sink_obj>
</item>
<item class_id_reference="20" object_id="_88">
<id>87</id>
<edge_type>2</edge_type>
<source_obj>18</source_obj>
<sink_obj>14</sink_obj>
</item>
<item class_id_reference="20" object_id="_89">
<id>88</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_90">
<id>89</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_91">
<id>90</id>
<edge_type>2</edge_type>
<source_obj>62</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_92">
<id>91</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_93">
<id>92</id>
<edge_type>2</edge_type>
<source_obj>18</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_94">
<id>93</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_95">
<id>94</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_96">
<id>95</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_97">
<id>97</id>
<edge_type>1</edge_type>
<source_obj>96</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_98">
<id>98</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_99">
<id>101</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_100">
<id>103</id>
<edge_type>1</edge_type>
<source_obj>102</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_101">
<id>104</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_102">
<id>105</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_103">
<id>107</id>
<edge_type>1</edge_type>
<source_obj>106</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_104">
<id>108</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_105">
<id>109</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_106">
<id>110</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_107">
<id>111</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_108">
<id>113</id>
<edge_type>1</edge_type>
<source_obj>112</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_109">
<id>114</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_110">
<id>115</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_111">
<id>118</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_112">
<id>119</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_113">
<id>120</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_114">
<id>121</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>31</sink_obj>
</item>
<item class_id_reference="20" object_id="_115">
<id>122</id>
<edge_type>1</edge_type>
<source_obj>106</source_obj>
<sink_obj>31</sink_obj>
</item>
<item class_id_reference="20" object_id="_116">
<id>123</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>31</sink_obj>
</item>
<item class_id_reference="20" object_id="_117">
<id>124</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>32</sink_obj>
</item>
<item class_id_reference="20" object_id="_118">
<id>125</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_119">
<id>127</id>
<edge_type>1</edge_type>
<source_obj>126</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_120">
<id>128</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_121">
<id>129</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_122">
<id>130</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_123">
<id>131</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_124">
<id>132</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_125">
<id>133</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_126">
<id>134</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_127">
<id>135</id>
<edge_type>1</edge_type>
<source_obj>33</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_128">
<id>136</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_129">
<id>137</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_130">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>106</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_131">
<id>139</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_132">
<id>140</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_133">
<id>141</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_134">
<id>142</id>
<edge_type>1</edge_type>
<source_obj>106</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_135">
<id>143</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_136">
<id>144</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_137">
<id>145</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>44</sink_obj>
</item>
<item class_id_reference="20" object_id="_138">
<id>146</id>
<edge_type>1</edge_type>
<source_obj>126</source_obj>
<sink_obj>44</sink_obj>
</item>
<item class_id_reference="20" object_id="_139">
<id>147</id>
<edge_type>1</edge_type>
<source_obj>43</source_obj>
<sink_obj>44</sink_obj>
</item>
<item class_id_reference="20" object_id="_140">
<id>150</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_141">
<id>152</id>
<edge_type>1</edge_type>
<source_obj>151</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_142">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_143">
<id>154</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_144">
<id>155</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_145">
<id>156</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_146">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>157</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_147">
<id>159</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_148">
<id>160</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_149">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>48</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_150">
<id>163</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_151">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_152">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>50</source_obj>
<sink_obj>51</sink_obj>
</item>
<item class_id_reference="20" object_id="_153">
<id>166</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_154">
<id>167</id>
<edge_type>1</edge_type>
<source_obj>106</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_155">
<id>168</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_156">
<id>169</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_157">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_158">
<id>171</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_159">
<id>172</id>
<edge_type>1</edge_type>
<source_obj>106</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_160">
<id>173</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_161">
<id>174</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_162">
<id>175</id>
<edge_type>1</edge_type>
<source_obj>54</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_163">
<id>178</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_164">
<id>180</id>
<edge_type>1</edge_type>
<source_obj>179</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_165">
<id>182</id>
<edge_type>1</edge_type>
<source_obj>181</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_166">
<id>184</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_167">
<id>185</id>
<edge_type>1</edge_type>
<source_obj>179</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_168">
<id>186</id>
<edge_type>1</edge_type>
<source_obj>181</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_169">
<id>187</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_170">
<id>188</id>
<edge_type>1</edge_type>
<source_obj>56</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_171">
<id>189</id>
<edge_type>1</edge_type>
<source_obj>57</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_172">
<id>190</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>59</sink_obj>
</item>
<item class_id_reference="20" object_id="_173">
<id>192</id>
<edge_type>1</edge_type>
<source_obj>191</source_obj>
<sink_obj>59</sink_obj>
</item>
<item class_id_reference="20" object_id="_174">
<id>193</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>60</sink_obj>
</item>
<item class_id_reference="20" object_id="_175">
<id>194</id>
<edge_type>1</edge_type>
<source_obj>59</source_obj>
<sink_obj>60</sink_obj>
</item>
<item class_id_reference="20" object_id="_176">
<id>195</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_177">
<id>196</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_178">
<id>197</id>
<edge_type>2</edge_type>
<source_obj>65</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_179">
<id>199</id>
<edge_type>1</edge_type>
<source_obj>198</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_180">
<id>200</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_181">
<id>201</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_182">
<id>202</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_183">
<id>203</id>
<edge_type>2</edge_type>
<source_obj>76</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_184">
<id>204</id>
<edge_type>2</edge_type>
<source_obj>72</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_185">
<id>205</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>68</sink_obj>
</item>
<item class_id_reference="20" object_id="_186">
<id>206</id>
<edge_type>1</edge_type>
<source_obj>96</source_obj>
<sink_obj>68</sink_obj>
</item>
<item class_id_reference="20" object_id="_187">
<id>207</id>
<edge_type>1</edge_type>
<source_obj>59</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_188">
<id>208</id>
<edge_type>1</edge_type>
<source_obj>82</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_189">
<id>209</id>
<edge_type>1</edge_type>
<source_obj>68</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_190">
<id>210</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>70</sink_obj>
</item>
<item class_id_reference="20" object_id="_191">
<id>211</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>70</sink_obj>
</item>
<item class_id_reference="20" object_id="_192">
<id>212</id>
<edge_type>2</edge_type>
<source_obj>76</source_obj>
<sink_obj>71</sink_obj>
</item>
<item class_id_reference="20" object_id="_193">
<id>213</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_194">
<id>214</id>
<edge_type>1</edge_type>
<source_obj>82</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_195">
<id>215</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_196">
<id>216</id>
<edge_type>1</edge_type>
<source_obj>73</source_obj>
<sink_obj>74</sink_obj>
</item>
<item class_id_reference="20" object_id="_197">
<id>217</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>74</sink_obj>
</item>
<item class_id_reference="20" object_id="_198">
<id>218</id>
<edge_type>1</edge_type>
<source_obj>58</source_obj>
<sink_obj>75</sink_obj>
</item>
<item class_id_reference="20" object_id="_199">
<id>219</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_200">
<id>220</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_201">
<id>221</id>
<edge_type>2</edge_type>
<source_obj>18</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_202">
<id>222</id>
<edge_type>2</edge_type>
<source_obj>62</source_obj>
<sink_obj>65</sink_obj>
</item>
<item class_id_reference="20" object_id="_203">
<id>223</id>
<edge_type>2</edge_type>
<source_obj>62</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_204">
<id>224</id>
<edge_type>2</edge_type>
<source_obj>65</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_205">
<id>225</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>72</sink_obj>
</item>
<item class_id_reference="20" object_id="_206">
<id>226</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>76</sink_obj>
</item>
<item class_id_reference="20" object_id="_207">
<id>227</id>
<edge_type>2</edge_type>
<source_obj>72</source_obj>
<sink_obj>76</sink_obj>
</item>
<item class_id_reference="20" object_id="_208">
<id>228</id>
<edge_type>4</edge_type>
<source_obj>43</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_209">
<id>229</id>
<edge_type>4</edge_type>
<source_obj>32</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_210">
<id>230</id>
<edge_type>4</edge_type>
<source_obj>13</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_211">
<id>231</id>
<edge_type>4</edge_type>
<source_obj>11</source_obj>
<sink_obj>74</sink_obj>
</item>
<item class_id_reference="20" object_id="_212">
<id>232</id>
<edge_type>4</edge_type>
<source_obj>26</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_213">
<id>233</id>
<edge_type>4</edge_type>
<source_obj>21</source_obj>
<sink_obj>70</sink_obj>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_214">
<mId>1</mId>
<mTag>duc_imf3</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>7</count>
<item_version>0</item_version>
<item>15</item>
<item>18</item>
<item>62</item>
<item>65</item>
<item>67</item>
<item>72</item>
<item>76</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>7</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="-1"></fsm>
<res class_id="25" tracking_level="1" version="0" object_id="_215">
<dp_component_resource class_id="26" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_resource>
<dp_expression_resource>
<count>0</count>
<item_version>0</item_version>
</dp_expression_resource>
<dp_fifo_resource>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_resource>
<dp_memory_resource>
<count>0</count>
<item_version>0</item_version>
</dp_memory_resource>
<dp_multiplexer_resource>
<count>0</count>
<item_version>0</item_version>
</dp_multiplexer_resource>
<dp_register_resource>
<count>0</count>
<item_version>0</item_version>
</dp_register_resource>
<dp_component_map class_id="27" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_map>
<dp_expression_map>
<count>0</count>
<item_version>0</item_version>
</dp_expression_map>
<dp_fifo_map>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_map>
<dp_memory_map>
<count>0</count>
<item_version>0</item_version>
</dp_memory_map>
</res>
<node_label_latency class_id="28" tracking_level="0" version="0">
<count>60</count>
<item_version>0</item_version>
<item class_id="29" tracking_level="0" version="0">
<first>10</first>
<second class_id="30" tracking_level="0" version="0">
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>11</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>14</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>19</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>29</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>31</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>32</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>33</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>3</first>
<second>2</second>
</second>
</item>
<item>
<first>38</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>39</first>
<second>
<first>5</first>
<second>1</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>41</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>42</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>55</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>58</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>59</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>61</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>68</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>70</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>71</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>73</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>74</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>75</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="31" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="32" tracking_level="0" version="0">
<first>15</first>
<second class_id="33" tracking_level="0" version="0">
<first>0</first>
<second>1</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>1</first>
<second>7</second>
</second>
</item>
<item>
<first>65</first>
<second>
<first>7</first>
<second>7</second>
</second>
</item>
<item>
<first>67</first>
<second>
<first>7</first>
<second>7</second>
</second>
</item>
<item>
<first>72</first>
<second>
<first>7</first>
<second>7</second>
</second>
</item>
<item>
<first>76</first>
<second>
<first>7</first>
<second>7</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="34" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</regions>
<dp_fu_nodes class_id="35" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="36" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="37" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>0</count>
<item_version>0</item_version>
</dp_reg_nodes>
<dp_regname_nodes>
<count>0</count>
<item_version>0</item_version>
</dp_regname_nodes>
<dp_reg_phi>
<count>0</count>
<item_version>0</item_version>
</dp_reg_phi>
<dp_regname_phi>
<count>0</count>
<item_version>0</item_version>
</dp_regname_phi>
<dp_port_io_nodes class_id="38" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_port_io_nodes>
<port2core class_id="39" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- T R E E _ I O --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the routines used to read and write the tree files
-- used by ASIS. Only the actual read and write routines are here. The open,
-- create and close routines are elsewhere (in Osint in the compiler, and in
-- the tree read driver for the tree read interface).
with Types; use Types;
with System; use System;
pragma Warnings (Off);
-- This package is used also by gnatcoll
with System.OS_Lib; use System.OS_Lib;
pragma Warnings (On);
package Tree_IO is
Tree_Format_Error : exception;
-- Raised if a format error is detected in the input file
ASIS_Version_Number : constant := 34;
-- ASIS Version. This is used to check for consistency between the compiler
-- used to generate trees and an ASIS application that is reading the
-- trees. It must be incremented whenever a change is made to the tree
-- format that would result in the compiler being incompatible with an
-- older version of ASIS.
--
-- 27 Changes in the tree structures for expression functions
-- 28 Changes in Snames
-- 29 Changes in Sem_Ch3 (tree copying in case of discriminant constraint
-- for concurrent types).
-- 30 Add Check_Float_Overflow boolean to tree file
-- 31 Remove read/write of Debug_Pragmas_Disabled/Debug_Pragmas_Enabled
-- 32 Change the way entities are changed through Next_Entity field in
-- the hierarchy of child units
-- 33 Add copying subtrees for rewriting infix calls of operator
-- functions for the corresponding original nodes.
-- 34 Add read/write of Address_Is_Private, Ignore_Rep_Clauses,
-- Ignore_Style_Check_Pragmas, Multiple_Unit_Index. Also this
-- is the version where rep clauses are removed by -gnatI.
procedure Tree_Read_Initialize (Desc : File_Descriptor);
-- Called to initialize reading of a tree file. This call must be made
-- before calls to Tree_Read_xx. No calls to Tree_Write_xx are permitted
-- after this call.
procedure Tree_Read_Data (Addr : Address; Length : Int);
-- Checks that the Length provided is the same as what has been provided
-- to the corresponding Tree_Write_Data from the current tree file,
-- Tree_Format_Error is raised if it is not the case. If Length is
-- correct and non zero, reads Length bytes of information into memory
-- starting at Addr from the current tree file.
procedure Tree_Read_Bool (B : out Boolean);
-- Reads a single boolean value. The boolean value must have been written
-- with a call to the Tree_Write_Bool procedure.
procedure Tree_Read_Char (C : out Character);
-- Reads a single character. The character must have been written with a
-- call to the Tree_Write_Char procedure.
procedure Tree_Read_Int (N : out Int);
-- Reads a single integer value. The integer must have been written with
-- a call to the Tree_Write_Int procedure.
procedure Tree_Read_Str (S : out String_Ptr);
-- Read string, allocate on heap, and return pointer to allocated string
-- which always has a lower bound of 1.
procedure Tree_Read_Terminate;
-- Called after reading all data, checks that the buffer pointers is at
-- the end of file, raising Tree_Format_Error if not.
procedure Tree_Write_Initialize (Desc : File_Descriptor);
-- Called to initialize writing of a tree file. This call must be made
-- before calls to Tree_Write_xx. No calls to Tree_Read_xx are permitted
-- after this call.
procedure Tree_Write_Data (Addr : Address; Length : Int);
-- Writes Length then, if Length is not null, Length bytes of data
-- starting at Addr to current tree file
procedure Tree_Write_Bool (B : Boolean);
-- Writes a single boolean value to the current tree file
procedure Tree_Write_Char (C : Character);
-- Writes a single character to the current tree file
procedure Tree_Write_Int (N : Int);
-- Writes a single integer value to the current tree file
procedure Tree_Write_Str (S : String_Ptr);
-- Write out string value referenced by S (low bound of S must be 1)
procedure Tree_Write_Terminate;
-- Terminates writing of the file (flushing the buffer), but does not
-- close the file (the caller is responsible for closing the file).
end Tree_IO;
|
--
-- Copyright (C) 2022 Jeremy Grosser <jeremy@synack.me>
--
-- SPDX-License-Identifier: BSD-3-Clause
--
-- nRF24L01+ 2.4 GHz GFSK modem
--
-- This driver disables the Enhanced ShockBurst™ acknowledgement and checksum
-- features and just acts like a dumb GFSK modem. You will need to add your
-- own checksum, error correction codes, and acknowledgement protocol as
-- needed.
--
-- Think of the NRF_Address as more of a preamble than a way of ensuring that
-- frames get to the right place. Add a header to your data if this is
-- important to your application.
--
-- Frequency hopping, data whitening and parity are good ideas.
--
with Ada.Unchecked_Conversion;
with HAL.SPI; use HAL.SPI;
with HAL; use HAL;
with HAL.GPIO;
package NRF24L01 is
type Device
(Port : HAL.SPI.Any_SPI_Port;
CS : HAL.GPIO.Any_GPIO_Point;
CE : HAL.GPIO.Any_GPIO_Point)
is tagged private;
subtype NRF_Address_Width is Positive range 3 .. 5;
type NRF_Address
(Width : NRF_Address_Width)
is record
Addr : UInt8_Array (1 .. Width);
end record;
type NRF_Channel is range 2_400 .. 2_527;
-- MHz, default 2_476
type NRF_Payload_Length is range 1 .. 32;
type NRF_Transmit_Power is
(Low_Power, -- -18 dBm
Medium_Power, -- -12 dBm
High_Power, -- -6 dBm
Max_Power); -- 0 dBm (default)
type NRF_Data_Rate is
(Low_Rate, -- 125 Kbps
Medium_Rate, -- 1 Mbps
High_Rate); -- 2 Mbps (default)
procedure Initialize
(This : in out Device);
procedure Interrupt
(This : in out Device);
-- Interrupt must be called upon the falling edge of the IRQ pin. Failure
-- to do so will make Receive stop working and Transmit may keep the
-- amplifier turned on for too long and and damage your chip.
procedure Set_Channel
(This : in out Device;
MHz : NRF_Channel);
procedure Set_Data_Rate
(This : in out Device;
Rate : NRF_Data_Rate);
function Is_Transmitting
(This : Device)
return Boolean;
procedure Transmit
(This : in out Device;
Addr : NRF_Address;
Data : UInt8_Array;
Power : NRF_Transmit_Power := Max_Power)
with Pre => not This.Is_Transmitting;
procedure Listen
(This : in out Device;
Addr : NRF_Address;
Length : NRF_Payload_Length);
procedure Receive
(This : in out Device;
Data : out UInt8_Array);
procedure Power_Down
(This : in out Device);
function Data_Ready
(This : in out Device)
return Natural;
-- Number of frames waiting in the receive FIFO.
-- Don't call Receive if Data_Ready = 0
procedure Poll
(This : in out Device);
private
type NRF_Mode is (Idle, Transmitting, Receiving);
type Device
(Port : HAL.SPI.Any_SPI_Port;
CS : HAL.GPIO.Any_GPIO_Point;
CE : HAL.GPIO.Any_GPIO_Point)
is tagged record
Mode : NRF_Mode := Idle;
RX_DR : Natural with Atomic;
Rate_Low : Boolean;
Rate_High : Boolean;
end record;
type Register is
(CONFIG,
EN_AA,
EN_RXADDR,
SETUP_AW,
SETUP_RETR,
RF_CH,
RF_SETUP,
STATUS,
OBSERVE_TX,
RPD,
RX_ADDR_P0,
RX_ADDR_P1,
RX_ADDR_P2,
RX_ADDR_P3,
RX_ADDR_P4,
RX_ADDR_P5,
TX_ADDR,
RX_PW_P0,
RX_PW_P1,
RX_PW_P2,
RX_PW_P3,
RX_PW_P4,
RX_PW_P5,
FIFO_STATUS,
DYNPD,
FEATURE);
for Register use
(CONFIG => 16#00#,
EN_AA => 16#01#,
EN_RXADDR => 16#02#,
SETUP_AW => 16#03#,
SETUP_RETR => 16#04#,
RF_CH => 16#05#,
RF_SETUP => 16#06#,
STATUS => 16#07#,
OBSERVE_TX => 16#08#,
RPD => 16#09#,
RX_ADDR_P0 => 16#0A#,
RX_ADDR_P1 => 16#0B#,
RX_ADDR_P2 => 16#0C#,
RX_ADDR_P3 => 16#0D#,
RX_ADDR_P4 => 16#0E#,
RX_ADDR_P5 => 16#0F#,
TX_ADDR => 16#10#,
RX_PW_P0 => 16#11#,
RX_PW_P1 => 16#12#,
RX_PW_P2 => 16#13#,
RX_PW_P3 => 16#14#,
RX_PW_P4 => 16#15#,
RX_PW_P5 => 16#16#,
FIFO_STATUS => 16#17#,
DYNPD => 16#1C#,
FEATURE => 16#1D#);
type STATUS_Register is record
RX_DR : Boolean := False;
TX_DS : Boolean := False;
MAX_RT : Boolean := False;
RX_P_NO : UInt3 := 0;
TX_FULL : Boolean := False;
end record
with Size => 8;
for STATUS_Register use record
RX_DR at 0 range 6 .. 6;
TX_DS at 0 range 5 .. 5;
MAX_RT at 0 range 4 .. 4;
RX_P_NO at 0 range 1 .. 3;
TX_FULL at 0 range 0 .. 0;
end record;
function To_STATUS_Register is new Ada.Unchecked_Conversion
(Source => UInt8,
Target => STATUS_Register);
type CONFIG_PRIM_RX_Field is (PTX, PRX)
with Size => 1;
type CONFIG_Register is record
MASK_RX_DR : Boolean := False;
MASK_TX_DS : Boolean := False;
MASK_MAX_RT : Boolean := False;
EN_CRC : Boolean := True;
CRCO : Boolean := False;
PWR_UP : Boolean := False;
PRIM_RX : CONFIG_PRIM_RX_Field := PTX;
end record
with Size => 8;
for CONFIG_Register use record
MASK_RX_DR at 0 range 6 .. 6;
MASK_TX_DS at 0 range 5 .. 5;
MASK_MAX_RT at 0 range 4 .. 4;
EN_CRC at 0 range 3 .. 3;
CRCO at 0 range 2 .. 2;
PWR_UP at 0 range 1 .. 1;
PRIM_RX at 0 range 0 .. 0;
end record;
function To_UInt8 is new Ada.Unchecked_Conversion
(Source => CONFIG_Register,
Target => UInt8);
type RF_SETUP_Register is record
CONT_WAVE : Boolean := False;
RF_DR_LOW : Boolean := False;
PLL_LOCK : Boolean := False;
RF_DR_HIGH : Boolean := True;
RF_PWR : UInt2 := 2#11#;
end record
with Size => 8;
for RF_SETUP_Register use record
CONT_WAVE at 0 range 7 .. 7;
RF_DR_LOW at 0 range 5 .. 5;
PLL_LOCK at 0 range 4 .. 4;
RF_DR_HIGH at 0 range 3 .. 3;
RF_PWR at 0 range 1 .. 2;
end record;
function To_UInt8 is new Ada.Unchecked_Conversion
(Source => RF_SETUP_Register,
Target => UInt8);
procedure SPI_Transfer
(This : in out Device;
Data : in out SPI_Data_8b);
procedure W_REGISTER
(This : in out Device;
Reg : Register;
Data : UInt8_Array);
procedure W_REGISTER
(This : in out Device;
Reg : Register;
Data : UInt8);
procedure R_REGISTER
(This : in out Device;
Reg : Register;
Data : out UInt8);
procedure FLUSH_TX
(This : in out Device);
procedure FLUSH_RX
(This : in out Device);
procedure W_TX_PAYLOAD
(This : in out Device;
Data : UInt8_Array);
procedure R_RX_PAYLOAD
(This : in out Device;
Data : out UInt8_Array);
procedure NOP
(This : in out Device;
Status : out STATUS_Register);
procedure Clear_Status
(This : in out Device);
procedure Set_Transmit_Address
(This : in out Device;
Addr : NRF_Address);
procedure Set_Receive_Address
(This : in out Device;
Addr : NRF_Address);
end NRF24L01;
|
with Runge_8th;
with Text_IO; use Text_IO;
with Orbit;
procedure runge_8th_order_demo_2 is
type Real is digits 15;
package One_Electron_Atom is new Orbit (Real);
use One_Electron_Atom;
package Orb_Integrate is new
Runge_8th (Real, Dyn_Index, Dynamical_Variable, F, "*", "+", "-", Norm);
use Orb_Integrate;
package rio is new Float_IO(Real);
use rio;
package iio is new Integer_IO(Step_Integer);
use iio;
Initial_Condition : Dynamical_Variable;
Previous_Y, Final_Y : Dynamical_Variable;
Final_Time, Starting_Time : Real;
Previous_t, Final_t : Real;
Delta_t : Real;
Initial_Energy : Real;
Steps : Step_Integer := 200;
Error_Tolerance : Real := 5.0E-13;
Error_Control_Desired : Boolean := False;
Answer : Character := 'n';
begin
-- choose initial conditions
new_line;
put ("The test calculates the trajectory of a body in a highly elliptical orbit.");
new_line;
put ("During most of the orbit a large step-size is fine. During the near-");
new_line;
put ("collision of the 2 bodies, a tiny step-size is necessary. The test");
new_line;
put ("demonstrates that the error control option (which uses variable step-size)");
new_line;
put ("is more efficient, (~300 times faster than the static step-size option).");
new_line(2);
put ("Input number of steps (try 400_000 with and without error control): ");
new_line;
get (Steps);
new_line;
put ("Every time the integration advances Delta_t = 4, ERROR is printed.");
new_line;
put ("Use error control? Enter y or n:"); new_line; get (Answer);
if (Answer = 'Y') or (Answer = 'y') then
Error_Control_Desired := True;
put ("Error control it is."); new_line;
else
Error_Control_Desired := False;
put ("OK, no error control."); new_line;
end if;
--if Error_Control_Desired then
--put ("Input error tolerance:");
--new_line; get (Error_Tolerance);
--end if;
Initial_Condition(0) := 0.0;
Initial_Condition(1) := 1.0;
--Initial_Condition(2) := 2.0; -- circular orbit
Initial_Condition(2) := 0.20; -- highly ellitical orbit
Initial_Condition(3) := 0.0;
Starting_Time := 0.0;
Final_Time := 4.0;
Initial_Energy := Energy (Initial_Condition);
Previous_Y := Initial_Condition;
Previous_t := Starting_Time;
Delta_t := Final_Time - Starting_Time;
for i in 1..30 loop
Final_t := Previous_t + Delta_t;
Integrate
(Final_State => Final_Y, -- the result (output).
Final_Time => Final_t, -- end integration here.
Initial_State => Previous_Y, -- the initial condition (input).
Initial_Time => Previous_t, -- start integrating here.
No_Of_Steps => Steps, -- if no err control, this is no_of_steps
Error_Control_Desired => Error_Control_Desired,
Error_Tolerance => Error_Tolerance);
Previous_Y := Final_Y;
Previous_t := Final_t;
new_line;
put ("Time = t =");
put (Final_t, Aft => 7);
put (", Error = (True Energy - Integrated) = ");
put (Abs (Initial_Energy - Energy (Final_Y)), Aft => 7);
end loop;
if (Answer = 'Y') or (Answer = 'y') then
new_line(2);
put ("With error control enabled, program attempted to reduce");
new_line;
put ("error *per step* to (well) under: ");
put (Error_Tolerance, Aft => 6);
new_line;
put ("Over thousands of steps, accumulated error will be much larger than that.");
new_line(2);
end if;
end;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Nodes.Array_Component_Association_Vectors;
with Program.Nodes.Aspect_Specification_Vectors;
with Program.Nodes.Element_Vectors;
with Program.Nodes.Expression_Vectors;
with Program.Nodes.Case_Expression_Path_Vectors;
with Program.Nodes.Case_Path_Vectors;
with Program.Nodes.Component_Clause_Vectors;
with Program.Nodes.Defining_Identifier_Vectors;
with Program.Nodes.Discrete_Range_Vectors;
with Program.Nodes.Discriminant_Association_Vectors;
with Program.Nodes.Discriminant_Specification_Vectors;
with Program.Nodes.Elsif_Path_Vectors;
with Program.Nodes.Enumeration_Literal_Specification_Vectors;
with Program.Nodes.Exception_Handler_Vectors;
with Program.Nodes.Formal_Package_Association_Vectors;
with Program.Nodes.Identifier_Vectors;
with Program.Nodes.Parameter_Association_Vectors;
with Program.Nodes.Parameter_Specification_Vectors;
with Program.Nodes.Record_Component_Association_Vectors;
with Program.Nodes.Select_Path_Vectors;
with Program.Nodes.Variant_Vectors;
with Program.Storage_Pools;
package body Program.Element_Vector_Factories is
type Array_Component_Association_Vector_Access is
not null access Program.Nodes.Array_Component_Association_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Aspect_Specification_Vector_Access is
not null access Program.Nodes.Aspect_Specification_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Case_Expression_Path_Vector_Access is
not null access Program.Nodes.Case_Expression_Path_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Case_Path_Vector_Access is
not null access Program.Nodes.Case_Path_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Component_Clause_Vector_Access is
not null access Program.Nodes.Component_Clause_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Defining_Identifier_Vector_Access is
not null access Program.Nodes.Defining_Identifier_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Discrete_Range_Vector_Access is
not null access Program.Nodes.Discrete_Range_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Discriminant_Association_Vector_Access is
not null access Program.Nodes.Discriminant_Association_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Discriminant_Specification_Vector_Access is
not null access Program.Nodes.Discriminant_Specification_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Element_Vector_Access is
not null access Program.Nodes.Element_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Elsif_Path_Vector_Access is
not null access Program.Nodes.Elsif_Path_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Enumeration_Literal_Specification_Vector_Access is not null access
Program.Nodes.Enumeration_Literal_Specification_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Exception_Handler_Vector_Access is
not null access Program.Nodes.Exception_Handler_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Expression_Vector_Access is
not null access Program.Nodes.Expression_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Formal_Package_Association_Vector_Access is not null access
Program.Nodes.Formal_Package_Association_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Identifier_Vector_Access is not null access
Program.Nodes.Identifier_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Parameter_Association_Vector_Access is not null access
Program.Nodes.Parameter_Association_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Parameter_Specification_Vector_Access is not null access
Program.Nodes.Parameter_Specification_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Record_Component_Association_Vector_Access is not null access
Program.Nodes.Record_Component_Association_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Select_Path_Vector_Access is not null access
Program.Nodes.Select_Path_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
type Variant_Vector_Access is not null access
Program.Nodes.Variant_Vectors.Vector
with Storage_Pool => Program.Storage_Pools.Pool;
-----------------------------------------------
-- Create_Array_Component_Association_Vector --
-----------------------------------------------
not overriding function Create_Array_Component_Association_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Array_Component_Associations
.Array_Component_Association_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Array_Component_Association_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Array_Component_Association_Vectors.Vector'
(Program.Nodes.Array_Component_Association_Vectors.Create
(Each));
begin
return Program.Elements.Array_Component_Associations
.Array_Component_Association_Vector_Access (Result);
end;
end Create_Array_Component_Association_Vector;
----------------------------------------
-- Create_Aspect_Specification_Vector --
----------------------------------------
not overriding function Create_Aspect_Specification_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Aspect_Specification_Vector_Access :=
new
(Self.Subpool) Program.Nodes.Aspect_Specification_Vectors.Vector'
(Program.Nodes.Aspect_Specification_Vectors.Create (Each));
begin
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access (Result);
end;
end Create_Aspect_Specification_Vector;
----------------------------------------
-- Create_Case_Expression_Path_Vector --
----------------------------------------
not overriding function Create_Case_Expression_Path_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Case_Expression_Paths
.Case_Expression_Path_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Case_Expression_Path_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Case_Expression_Path_Vectors.Vector'
(Program.Nodes.Case_Expression_Path_Vectors.Create (Each));
begin
return Program.Elements.Case_Expression_Paths
.Case_Expression_Path_Vector_Access (Result);
end;
end Create_Case_Expression_Path_Vector;
-----------------------------
-- Create_Case_Path_Vector --
-----------------------------
not overriding function Create_Case_Path_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Case_Paths.Case_Path_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Case_Path_Vector_Access :=
new (Self.Subpool) Program.Nodes.Case_Path_Vectors.Vector'
(Program.Nodes.Case_Path_Vectors.Create (Each));
begin
return Program.Elements.Case_Paths .Case_Path_Vector_Access (Result);
end;
end Create_Case_Path_Vector;
------------------------------------
-- Create_Component_Clause_Vector --
------------------------------------
not overriding function Create_Component_Clause_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Component_Clauses
.Component_Clause_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Component_Clause_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Component_Clause_Vectors.Vector'
(Program.Nodes.Component_Clause_Vectors.Create (Each));
begin
return Program.Elements.Component_Clauses
.Component_Clause_Vector_Access (Result);
end;
end Create_Component_Clause_Vector;
---------------------------------------
-- Create_Defining_Identifier_Vector --
---------------------------------------
not overriding function Create_Defining_Identifier_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Defining_Identifiers
.Defining_Identifier_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Defining_Identifier_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Defining_Identifier_Vectors.Vector'
(Program.Nodes.Defining_Identifier_Vectors.Create (Each));
begin
return Program.Elements.Defining_Identifiers
.Defining_Identifier_Vector_Access (Result);
end;
end Create_Defining_Identifier_Vector;
----------------------------------
-- Create_Discrete_Range_Vector --
----------------------------------
not overriding function Create_Discrete_Range_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Discrete_Ranges.Discrete_Range_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Discrete_Range_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Discrete_Range_Vectors.Vector'
(Program.Nodes.Discrete_Range_Vectors.Create (Each));
begin
return Program.Elements.Discrete_Ranges
.Discrete_Range_Vector_Access (Result);
end;
end Create_Discrete_Range_Vector;
--------------------------------------------
-- Create_Discriminant_Association_Vector --
--------------------------------------------
not overriding function Create_Discriminant_Association_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Discriminant_Associations
.Discriminant_Association_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Discriminant_Association_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Discriminant_Association_Vectors.Vector'
(Program.Nodes.Discriminant_Association_Vectors.Create (Each));
begin
return Program.Elements.Discriminant_Associations
.Discriminant_Association_Vector_Access (Result);
end;
end Create_Discriminant_Association_Vector;
----------------------------------------------
-- Create_Discriminant_Specification_Vector --
----------------------------------------------
not overriding function Create_Discriminant_Specification_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Discriminant_Specifications
.Discriminant_Specification_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Discriminant_Specification_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Discriminant_Specification_Vectors.Vector'
(Program.Nodes.Discriminant_Specification_Vectors.Create
(Each));
begin
return Program.Elements.Discriminant_Specifications
.Discriminant_Specification_Vector_Access (Result);
end;
end Create_Discriminant_Specification_Vector;
---------------------------
-- Create_Element_Vector --
---------------------------
not overriding function Create_Element_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Element_Vectors.Element_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Element_Vector_Access :=
new (Self.Subpool) Program.Nodes.Element_Vectors.Vector'
(Program.Nodes.Element_Vectors.Create (Each));
begin
return Program.Element_Vectors.Element_Vector_Access (Result);
end;
end Create_Element_Vector;
------------------------------
-- Create_Elsif_Path_Vector --
------------------------------
not overriding function Create_Elsif_Path_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Elsif_Paths.Elsif_Path_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Elsif_Path_Vector_Access :=
new (Self.Subpool) Program.Nodes.Elsif_Path_Vectors.Vector'
(Program.Nodes.Elsif_Path_Vectors.Create (Each));
begin
return Program.Elements.Elsif_Paths.Elsif_Path_Vector_Access (Result);
end;
end Create_Elsif_Path_Vector;
-----------------------------------------------------
-- Create_Enumeration_Literal_Specification_Vector --
-----------------------------------------------------
not overriding function Create_Enumeration_Literal_Specification_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Enumeration_Literal_Specifications
.Enumeration_Literal_Specification_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Enumeration_Literal_Specification_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Enumeration_Literal_Specification_Vectors.Vector'
(Program.Nodes.Enumeration_Literal_Specification_Vectors.Create
(Each));
begin
return Program.Elements.Enumeration_Literal_Specifications
.Enumeration_Literal_Specification_Vector_Access (Result);
end;
end Create_Enumeration_Literal_Specification_Vector;
-------------------------------------
-- Create_Exception_Handler_Vector --
-------------------------------------
not overriding function Create_Exception_Handler_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Exception_Handlers
.Exception_Handler_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Exception_Handler_Vector_Access :=
new (Self.Subpool) Program.Nodes.Exception_Handler_Vectors.Vector'
(Program.Nodes.Exception_Handler_Vectors.Create (Each));
begin
return Program.Elements.Exception_Handlers
.Exception_Handler_Vector_Access (Result);
end;
end Create_Exception_Handler_Vector;
------------------------------
-- Create_Expression_Vector --
------------------------------
not overriding function Create_Expression_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Expressions.Expression_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Expression_Vector_Access :=
new (Self.Subpool) Program.Nodes.Expression_Vectors.Vector'
(Program.Nodes.Expression_Vectors.Create (Each));
begin
return Program.Elements.Expressions.Expression_Vector_Access (Result);
end;
end Create_Expression_Vector;
----------------------------------------------
-- Create_Formal_Package_Association_Vector --
----------------------------------------------
not overriding function Create_Formal_Package_Association_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Formal_Package_Associations
.Formal_Package_Association_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Formal_Package_Association_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Formal_Package_Association_Vectors.Vector'
(Program.Nodes.Formal_Package_Association_Vectors.Create
(Each));
begin
return Program.Elements.Formal_Package_Associations
.Formal_Package_Association_Vector_Access (Result);
end;
end Create_Formal_Package_Association_Vector;
------------------------------
-- Create_Identifier_Vector --
------------------------------
not overriding function Create_Identifier_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Identifiers
.Identifier_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Identifier_Vector_Access :=
new (Self.Subpool) Program.Nodes.Identifier_Vectors.Vector'
(Program.Nodes.Identifier_Vectors.Create (Each));
begin
return Program.Elements.Identifiers.Identifier_Vector_Access (Result);
end;
end Create_Identifier_Vector;
-----------------------------------------
-- Create_Parameter_Association_Vector --
-----------------------------------------
not overriding function Create_Parameter_Association_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Parameter_Associations
.Parameter_Association_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Parameter_Association_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Parameter_Association_Vectors.Vector'
(Program.Nodes.Parameter_Association_Vectors.Create (Each));
begin
return Program.Elements.Parameter_Associations
.Parameter_Association_Vector_Access (Result);
end;
end Create_Parameter_Association_Vector;
-------------------------------------------
-- Create_Parameter_Specification_Vector --
-------------------------------------------
not overriding function Create_Parameter_Specification_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Parameter_Specification_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Parameter_Specification_Vectors.Vector'
(Program.Nodes.Parameter_Specification_Vectors.Create (Each));
begin
return Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access (Result);
end;
end Create_Parameter_Specification_Vector;
------------------------------------------------
-- Create_Record_Component_Association_Vector --
------------------------------------------------
not overriding function Create_Record_Component_Association_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Record_Component_Associations
.Record_Component_Association_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Record_Component_Association_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Record_Component_Association_Vectors.Vector'
(Program.Nodes.Record_Component_Association_Vectors.Create
(Each));
begin
return Program.Elements.Record_Component_Associations
.Record_Component_Association_Vector_Access (Result);
end;
end Create_Record_Component_Association_Vector;
-------------------------------
-- Create_Select_Path_Vector --
-------------------------------
not overriding function Create_Select_Path_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Select_Paths.Select_Path_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Select_Path_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Select_Path_Vectors.Vector'
(Program.Nodes.Select_Path_Vectors.Create (Each));
begin
return Program.Elements.Select_Paths.Select_Path_Vector_Access
(Result);
end;
end Create_Select_Path_Vector;
---------------------------
-- Create_Variant_Vector --
---------------------------
not overriding function Create_Variant_Vector
(Self : Element_Vector_Factory;
Each : Program.Element_Vectors.Iterators.Forward_Iterator'Class)
return Program.Elements.Variants.Variant_Vector_Access
is
Cursor : constant Program.Element_Vectors.Element_Cursor := Each.First;
begin
if not Program.Element_Vectors.Has_Element (Cursor) then
return null;
end if;
declare
Result : constant Variant_Vector_Access :=
new (Self.Subpool)
Program.Nodes.Variant_Vectors.Vector'
(Program.Nodes.Variant_Vectors.Create (Each));
begin
return Program.Elements.Variants.Variant_Vector_Access (Result);
end;
end Create_Variant_Vector;
end Program.Element_Vector_Factories;
|
-------------------------------------------------------------------------------
-- Copyright 2021, The Septum Developers (see AUTHORS file)
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- http://www.apache.org/licenses/LICENSE-2.0
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-------------------------------------------------------------------------------
with Ada.Containers.Vectors;
with SP.Cache;
with SP.Contexts;
with SP.Filters;
with SP.Strings;
package SP.Searches is
use SP.Strings;
type Search is limited private;
package Positive_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Positive);
use all type Ada.Containers.Count_Type;
function Reload_Working_Set (Srch : in out Search) return Boolean;
-- Dumps currently loaded search text and loads it again.
function Add_Directory (Srch : in out Search; Dir_Name : String) return Boolean;
function List_Directories (Srch : in Search) return String_Vectors.Vector;
-- Lists top level search directories.
procedure Clear_Directories (Srch : in out Search)
with Post => List_Directories (Srch).Is_Empty;
procedure Add_Extension (Srch : in out Search; Extension : String);
procedure Remove_Extension (Srch : in out Search; Extension : String);
procedure Clear_Extensions (Srch : in out Search);
function List_Extensions (Srch : in Search) return String_Vectors.Vector;
procedure Find_Text (Srch : in out Search; Text : String);
procedure Exclude_Text (Srch : in out Search; Text : String);
procedure Find_Like (Srch : in out Search; Text : String);
procedure Exclude_Like (Srch : in out Search; Text : String);
procedure Find_Regex (Srch : in out Search; Text : String);
procedure Exclude_Regex (Srch : in out Search; Text : String);
procedure Drop_Filter (Srch : in out Search; Index : Positive);
procedure Pop_Filter (Srch : in out Search);
-- Undoes the last search operations.
procedure Reorder_Filters (Srch : in out Search; Indices : Positive_Vectors.Vector)
with Pre => (for all Index of Indices => Natural (Index) <= Num_Filters (Srch))
and then (Natural (Indices.Length) = Num_Filters (Srch))
and then (for all I in 1 .. Num_Filters (Srch) => Indices.Contains (I));
procedure Clear_Filters (Srch : in out Search);
No_Context_Width : constant := Natural'Last;
procedure Set_Context_Width (Srch : in out Search; Context_Width : Natural);
function Get_Context_Width (Srch : in Search) return Natural;
No_Max_Results : constant := Natural'Last;
procedure Set_Max_Results (Srch : in out Search; Max_Results : Natural);
function Get_Max_Results (Srch : in Search) return Natural;
procedure Set_Search_On_Filters_Changed (Srch : in out Search; Enabled : Boolean);
function Get_Search_On_Filters_Changed (Srch : in out Search) return Boolean;
procedure Set_Line_Colors_Enabled (Srch : in out Search; Enabled : Boolean);
procedure Set_Print_Line_Numbers (Srch : in out Search; Enabled : Boolean);
function Get_Print_Line_Numbers (Srch : in Search) return Boolean;
function List_Filter_Names (Srch : in Search) return String_Vectors.Vector;
function Num_Filters (Srch : in Search) return Natural;
function Matching_Contexts (Srch : in Search) return SP.Contexts.Context_Vectors.Vector;
No_Limit : constant := Natural'Last;
procedure Print_Contexts (
Srch : in Search;
Contexts : SP.Contexts.Context_Vectors.Vector;
First : Natural;
Last : Natural);
procedure Print_Contexts_With_Cancellation(
Srch : in Search;
Contexts : SP.Contexts.Context_Vectors.Vector;
First : Natural;
Last : Natural);
function Num_Files (Srch : in Search) return Natural;
function Num_Lines (Srch : in Search) return Natural;
protected type Concurrent_Context_Results is
entry Get_Results(Out_Results : out SP.Contexts.Context_Vectors.Vector);
procedure Wait_For(Num_Results : Natural);
procedure Add_Result(More : SP.Contexts.Context_Vectors.Vector);
private
Pending_Results : Natural := 0;
Results : SP.Contexts.Context_Vectors.Vector;
end Concurrent_Context_Results;
function Is_Running_Script (Srch : Search; Script_Path : String) return Boolean;
procedure Push_Script (Srch : in out Search; Script_Path : String)
with Pre => not Is_Running_Script (Srch, Script_Path);
procedure Pop_Script (Srch : in out Search; Script_Path : String)
with Pre => Is_Running_Script (Srch, Script_Path);
procedure Test (Srch : Search; Input : String);
private
use SP.Filters;
-- The lines which match can determine the width of the context to be saved.
type Search is limited record
Directories : String_Sets.Set;
-- A list of all directories to search.
File_Cache : SP.Cache.Async_File_Cache;
-- Cached contents of files.
Line_Filters : Filter_List.Vector;
Extensions : String_Sets.Set;
Context_Width : Natural := 7;-- No_Context_Width;
Max_Results : Natural := No_Max_Results;
Print_Line_Numbers : Boolean := True;
Search_On_Filters_Changed : Boolean := False;
Enable_Line_Colors : Boolean := False;
-- The stack of currently executing scripts.
-- Intuitively this is a stack, but a set should work just a well,
-- since the focus is the membership test.
Script_Stack : String_Sets.Set;
end record;
end SP.Searches;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . W I D E _ C H A R A C T E R T S . U N I C O D E --
-- --
-- B o d y --
-- --
-- Copyright (C) 2005-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package body Ada.Wide_Characters.Unicode is
package G renames System.UTF_32;
------------------
-- Get_Category --
------------------
function Get_Category (U : Wide_Character) return Category is
begin
return Category (G.Get_Category (Wide_Character'Pos (U)));
end Get_Category;
--------------
-- Is_Digit --
--------------
function Is_Digit (U : Wide_Character) return Boolean is
begin
return G.Is_UTF_32_Digit (Wide_Character'Pos (U));
end Is_Digit;
function Is_Digit (C : Category) return Boolean is
begin
return G.Is_UTF_32_Digit (G.Category (C));
end Is_Digit;
---------------
-- Is_Letter --
---------------
function Is_Letter (U : Wide_Character) return Boolean is
begin
return G.Is_UTF_32_Letter (Wide_Character'Pos (U));
end Is_Letter;
function Is_Letter (C : Category) return Boolean is
begin
return G.Is_UTF_32_Letter (G.Category (C));
end Is_Letter;
------------------------
-- Is_Line_Terminator --
------------------------
function Is_Line_Terminator (U : Wide_Character) return Boolean is
begin
return G.Is_UTF_32_Line_Terminator (Wide_Character'Pos (U));
end Is_Line_Terminator;
-------------
-- Is_Mark --
-------------
function Is_Mark (U : Wide_Character) return Boolean is
begin
return G.Is_UTF_32_Mark (Wide_Character'Pos (U));
end Is_Mark;
function Is_Mark (C : Category) return Boolean is
begin
return G.Is_UTF_32_Mark (G.Category (C));
end Is_Mark;
--------------------
-- Is_Non_Graphic --
--------------------
function Is_Non_Graphic (U : Wide_Character) return Boolean is
begin
return G.Is_UTF_32_Non_Graphic (Wide_Character'Pos (U));
end Is_Non_Graphic;
function Is_Non_Graphic (C : Category) return Boolean is
begin
return G.Is_UTF_32_Non_Graphic (G.Category (C));
end Is_Non_Graphic;
--------------
-- Is_Other --
--------------
function Is_Other (U : Wide_Character) return Boolean is
begin
return G.Is_UTF_32_Other (Wide_Character'Pos (U));
end Is_Other;
function Is_Other (C : Category) return Boolean is
begin
return G.Is_UTF_32_Other (G.Category (C));
end Is_Other;
--------------------
-- Is_Punctuation --
--------------------
function Is_Punctuation (U : Wide_Character) return Boolean is
begin
return G.Is_UTF_32_Punctuation (Wide_Character'Pos (U));
end Is_Punctuation;
function Is_Punctuation (C : Category) return Boolean is
begin
return G.Is_UTF_32_Punctuation (G.Category (C));
end Is_Punctuation;
--------------
-- Is_Space --
--------------
function Is_Space (U : Wide_Character) return Boolean is
begin
return G.Is_UTF_32_Space (Wide_Character'Pos (U));
end Is_Space;
function Is_Space (C : Category) return Boolean is
begin
return G.Is_UTF_32_Space (G.Category (C));
end Is_Space;
-------------------
-- To_Lower_Case --
-------------------
function To_Lower_Case
(U : Wide_Character) return Wide_Character
is
begin
return
Wide_Character'Val
(G.UTF_32_To_Lower_Case (Wide_Character'Pos (U)));
end To_Lower_Case;
-------------------
-- To_Upper_Case --
-------------------
function To_Upper_Case
(U : Wide_Character) return Wide_Character
is
begin
return
Wide_Character'Val
(G.UTF_32_To_Upper_Case (Wide_Character'Pos (U)));
end To_Upper_Case;
end Ada.Wide_Characters.Unicode;
|
------------------------------------------------------------------------------
-- --
-- GNAT EXAMPLE --
-- --
-- Copyright (C) 2013-2020, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
pragma Restrictions (No_Elaboration_Code);
-- This subprogram is called before elaboration
pragma Warnings (Off);
with System.SAM4S; use System.SAM4S;
pragma Warnings (On);
with Interfaces.SAM; use Interfaces.SAM;
with Interfaces.SAM.EFC; use Interfaces.SAM.EFC;
with Interfaces.SAM.PMC; use Interfaces.SAM.PMC;
with Interfaces.SAM.SYSC; use Interfaces.SAM.SYSC;
procedure Setup_Pll is
CKGR_MOR : CKGR_MOR_Register;
begin
-- Main crystal is 12 Mhz and PLLA is set to x10. So main clock is 120 Mhz.
-- 5 wait states for the flash
EFC0_Periph.FMR.FWS := 5;
-- 28.2.13 Programming Sequence
-- 1. Enabling the Main Oscillator:
-- The main oscillator is enabled by setting the MOSCXTEN field in
-- the Main Oscillator Register (CKGR_MOR). The user can define a
-- start-up time. This can be achieved by writing a value in the
-- MOSCXTST field in CKGR_MOR. Once this register has been
-- correctly configured, the user must wait for MOSCXTS field in
-- the PMC_SR register to be set. This can be done either by
-- polling the status register, or by waiting the interrupt line
-- to be raised if the associated inter- rupt to MOSCXTS has been
-- enabled in the PMC_IER register.
CKGR_MOR := PMC_Periph.CKGR_MOR;
-- The Key field needs to be set to 0x37 to enable write to the
-- CKGR_MOR register
CKGR_MOR.KEY := Passwd;
CKGR_MOR.MOSCXTEN := True;
CKGR_MOR.MOSCXTST := 62;
PMC_Periph.CKGR_MOR := CKGR_MOR;
-- Wait until the xtal stabilize
while not PMC_Periph.PMC_SR.MOSCXTS loop
null;
end loop;
-- Select the xtal (must already be true, but doesn't harm)
CKGR_MOR := PMC_Periph.CKGR_MOR;
-- The Key field needs to be set to 0x37 to enable write to the
-- CKGR_MOR register
CKGR_MOR.KEY := Passwd;
CKGR_MOR.MOSCSEL := True;
PMC_Periph.CKGR_MOR := CKGR_MOR;
-- 2. Checking the Main Oscillator Frequency (Optional):
-- In some situations the user may need an accurate measure of the
-- main clock frequency. This measure can be accomplished via the
-- Main Clock Frequency Register (CKGR_MCFR). Once the MAINFRDY
-- field is set in CKGR_MCFR, the user may read the MAINF field in
-- CKGR_MCFR by performing another CKGR_MCFR read access. This
-- provides the number of main clock cycles within sixteen slow
-- clock cycles.
null;
-- 3. Setting PLL and Divider:
-- All parameters needed to configure PLLA and the divider are
-- located in CKGR_PLLAxR.
-- The DIV field is used to control the divider itself. It must be
-- set to 1 when PLL is used. By default, DIV parameter is set to
-- 0 which means that the divider is turned off.
-- The MUL field is the PLL multiplier factor. This parameter can
-- be programmed between 0 and 80. If MUL is set to 0, PLL will be
-- turned off, otherwise the PLL output frequency is PLL input
-- frequency multiplied by (MUL + 1).
-- The PLLCOUNT field specifies the number of slow clock cycles
-- before the LOCK bit is set in PMC_SR, after CKGR_PLLA(B)R has
-- been written.
-- First disable: MULA set to 0, DIVA set to 0
PMC_Periph.CKGR_PLLAR :=
(ONE => True,
MULA => 0,
DIVA => 0,
others => <>);
PMC_Periph.CKGR_PLLAR :=
(ONE => True,
DIVA => 1,
MULA => 10 - 1,
others => <>);
-- Once the CKGR_PLL register has been written, the user must wait
-- for the LOCK bit to be set in the PMC_SR. This can be done
-- either by polling the status register or by waiting the
-- interrupt line to be raised if the associated interrupt to LOCK
-- has been enabled in PMC_IER. All parameters in CKGR_PLLA(B)R
-- can be programmed in a single write operation. If at some stage
-- one of the following parameters, MUL or DIV is modified, the
-- LOCK bit will go low to indicate that PLL is not ready
-- yet. When PLL is locked, LOCK will be set again. The user is
-- constrained to wait for LOCK bit to be set before using the PLL
-- output clock.
while not PMC_Periph.PMC_SR.LOCKA loop
null;
end loop;
-- 4. Selection of Master Clock and Processor Clock
-- The Master Clock and the Processor Clock are configurable via
-- the Master Clock Register (PMC_MCKR).
-- The CSS field is used to select the Master Clock divider
-- source. By default, the selected clock source is main clock.
-- The PRES field is used to control the Master Clock
-- prescaler. The user can choose between different values (1, 2,
-- 3, 4, 8, 16, 32, 64). Master Clock output is prescaler input
-- divided by PRES parameter. By default, PRES parameter is set to
-- 1 which means that master clock is equal to main clock.
-- Once PMC_MCKR has been written, the user must wait for the
-- MCKRDY bit to be set in PMC_SR. This can be done either by
-- polling the status register or by waiting for the interrupt
-- line to be raised if the associated interrupt to MCKRDY has
-- been enabled in the PMC_IER register.
-- The PMC_MCKR must not be programmed in a single write
-- operation. The preferred programming sequence for PMC_MCKR is
-- as follows:
-- * If a new value for CSS field corresponds to PLL Clock,
-- * Program the PRES field in PMC_MCKR.
-- * Wait for the MCKRDY bit to be set in PMC_SR.
-- * Program the CSS field in PMC_MCKR.
-- * Wait for the MCKRDY bit to be set in PMC_SR.
-- * If a new value for CSS field corresponds to Main Clock
-- or Slow Clock,
-- * Program the CSS field in PMC_MCKR.
-- * Wait for the MCKRDY bit to be set in the PMC_SR.
-- * Program the PRES field in PMC_MCKR.
-- * Wait for the MCKRDY bit to be set in PMC_SR.
PMC_Periph.PMC_MCKR.PRES := Clk_1;
while not PMC_Periph.PMC_SR.MCKRDY loop
null;
end loop;
PMC_Periph.PMC_MCKR.CSS := Plla_Clk;
while not PMC_Periph.PMC_SR.MCKRDY loop
null;
end loop;
-- If at some stage one of the following parameters, CSS or PRES
-- is modified, the MCKRDY bit will go low to indicate that the
-- Master Clock and the Processor Clock are not ready yet. The
-- user must wait for MCKRDY bit to be set again before using the
-- Master and Processor Clocks.
-- Note: IF PLLx clock was selected as the Master Clock and the
-- user decides to modify it by writing in CKGR_PLLR, the MCKRDY
-- flag will go low while PLL is unlocked. Once PLL is locked
-- again, LOCK goes high and MCKRDY is set.
-- While PLL is unlocked, the Master Clock selection is
-- automatically changed to Slow Clock. For further information,
-- see Section 28.2.14.2 "Clock Switching Waveforms" on page 467.
-- Code Example:
-- write_register(PMC_MCKR,0x00000001)
-- wait (MCKRDY=1)
-- write_register(PMC_MCKR,0x00000011)
-- wait (MCKRDY=1)
-- The Master Clock is main clock divided by 2.
-- The Processor Clock is the Master Clock.
-- 5. Selection of Programmable Clocks
-- Programmable clocks are controlled via registers, PMC_SCER,
-- PMC_SCDR and PMC_SCSR.
-- Programmable clocks can be enabled and/or disabled via PMC_SCER
-- and PMC_SCDR. 3 Programmable clocks can be enabled or
-- disabled. The PMC_SCSR provides a clear indication as to which
-- Programmable clock is enabled. By default all Programmable
-- clocks are disabled.
-- Programmable Clock Registers (PMC_PCKx) are used to configure
-- Programmable clocks.
-- The CSS field is used to select the Programmable clock divider
-- source. Four clock options are available: main clock, slow
-- clock, PLLACK, PLLBCK. By default, the clock source selected is
-- slow clock.
-- The PRES field is used to control the Programmable clock
-- prescaler. It is possible to choose between different values
-- (1, 2, 4, 8, 16, 32, 64). Programmable clock output is
-- prescaler input divided by PRES parameter. By default, the PRES
-- parameter is set to 0 which means that master clock is equal to
-- slow clock.
-- Once PMC_PCKx has been programmed, The corresponding
-- Programmable clock must be enabled and the user is constrained
-- to wait for the PCKRDYx bit to be set in PMC_SR. This can be
-- done either by polling the status register or by waiting the
-- interrupt line to be raised, if the associated interrupt to
-- PCKRDYx has been enabled in the PMC_IER register. All parameters in
-- PMC_PCKx can be programmed in a single write operation.
-- If the CSS and PRES parameters are to be modified, the
-- corresponding Programmable clock must be disabled first. The
-- parameters can then be modified. Once this has been done, the
-- user must re-enable the Programmable clock and wait for the
-- PCKRDYx bit to be set.
null;
-- 6. Enabling Peripheral Clocks
-- Once all of the previous steps have been completed, the
-- peripheral clocks can be enabled and/or disabled via registers
-- PMC_PCER0, PMC_PCER, PMC_PCDR0 and PMC_PCDR.
null;
-- Disable watchdog. The register can be written once, so this file has
-- to be modified to enable watchdog.
WDT_Periph.MR.WDDIS := True;
end Setup_Pll;
|
-------------------------------------------------------------------------------
-- Copyright 2021, The Septum Developers (see AUTHORS file)
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- http://www.apache.org/licenses/LICENSE-2.0
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-------------------------------------------------------------------------------
with Ada.Directories;
with SP.Strings;
-- Wraps file system operations to make them simpler, and handle cases without
-- using exceptions.
package SP.File_System is
use SP.Strings;
-- Checks that a file at the given path exists.
function Is_File (Target : String) return Boolean;
-- Checks that a dir at the given path exists.
function Is_Dir (Target : String) return Boolean;
-- Ada.Directories.Hierarchical_File_Names is optional, and doesn't exist
-- on some of the Linux platforms tested for Alire crates.
function Is_Current_Or_Parent_Directory (Dir_Entry : Ada.Directories.Directory_Entry_Type) return Boolean;
type Dir_Contents is record
Files : String_Vectors.Vector;
Subdirs : String_Vectors.Vector;
end record;
-- The immediate, non-recursive, contents of the given directory.
function Contents (Dir_Name : String) return Dir_Contents;
-- Pulls the contents of a textual file, which might possibly fail due to
-- the file not existing or being a directory instead of a file.
function Read_Lines (File_Name : in String; Result : out String_Vectors.Vector) return Boolean;
-- Finds a path similar to the given one with the same basic stem.
function Similar_Path (Path : String) return String;
-- Rewrite a path with all forward slashes for simplicity.
function Rewrite_Path (Path : String) return String;
-- Produces all of the possible options for a path.
function File_Completions (Path : String) return String_Vectors.Vector;
end SP.File_System;
|
-------------------------------------------------------------------------
-- GL.Geometry - GL vertex buffer Object
--
-- Copyright (c) Rod Kay 2007
-- AUSTRALIA
-- Permission granted to use this software, without any warranty,
-- for any purpose, provided this copyright note remains attached
-- and unmodified if sources are distributed further.
-------------------------------------------------------------------------
-- with GL.Geometry;
-- with GL.Textures;
package GL.Buffer is
subtype vbo_Name is GL.Uint; -- an openGL vertex buffer 'name', which is a natural integer.
-- buffer object
--
type Object is abstract tagged private;
procedure Enable (Self : Object'Class);
procedure Destroy (Self : in out Object'Class);
function Extract_VBO_Target (Self : Object) return GL.VBO_Target is abstract;
-- 'array' and 'element array' base classes
--
type array_Object is new Object with private;
type element_array_Object is new Object with private;
-- refer to child packages, for specific buffers:
--
-- - GL.Buffer.vertex
-- - GL.Buffer.texture_coords
-- - GL.Buffer.normals
-- - GL.Buffer.indices
--
-- (tbd : pixel pack/unpack buffers)
no_platform_Support : exception;
--
-- raised by buffer 'Map' functions when OS platform does not support GL Buffer objects.
private
type Object is abstract tagged
record
Name : aliased vbo_Name := 0;
Length : Positive;
end record;
overriding function Extract_VBO_Target (Self : array_Object) return GL.VBO_Target;
overriding function Extract_VBO_Target (Self : element_array_Object) return GL.VBO_Target;
type array_Object is new Object with null record;
type element_array_Object is new Object with null record;
type vertex_buffer_Object is new array_Object with null record;
-- support
procedure Verify_Name (Self : in out Object'Class);
end GL.Buffer;
|
-- This package is intended to set up and tear down the test environment.
-- Once created by GNATtest, this package will never be overwritten
-- automatically. Contents of this package can be modified in any way
-- except for sections surrounded by a 'read only' marker.
package body Factions.Test_Data is
procedure Set_Up(Gnattest_T: in out Test) is
pragma Unreferenced(Gnattest_T);
begin
null;
end Set_Up;
procedure Tear_Down(Gnattest_T: in out Test) is
pragma Unreferenced(Gnattest_T);
begin
null;
end Tear_Down;
end Factions.Test_Data;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with League.Holders.Booleans;
with League.JSON.Arrays.Internals;
with League.Holders.JSON_Arrays;
with League.Holders.JSON_Objects;
with League.JSON.Objects.Internals;
with League.Strings.Internals;
with Matreshka.Internals.Strings;
package body League.JSON.Values is
use type Matreshka.JSON_Types.Value_Kinds;
------------
-- Adjust --
------------
overriding procedure Adjust (Self : in out JSON_Value) is
begin
Matreshka.JSON_Types.Reference (Self.Data);
end Adjust;
--------------
-- Finalize --
--------------
overriding procedure Finalize (Self : in out JSON_Value) is
use type Matreshka.JSON_Types.Shared_JSON_Value_Access;
begin
if Self.Data /= null then
Matreshka.JSON_Types.Dereference (Self.Data);
end if;
end Finalize;
--------------
-- Is_Array --
--------------
function Is_Array (Self : JSON_Value'Class) return Boolean is
begin
return Self.Data.Value.Kind = Matreshka.JSON_Types.Array_Value;
end Is_Array;
----------------
-- Is_Boolean --
----------------
function Is_Boolean (Self : JSON_Value'Class) return Boolean is
begin
return Self.Data.Value.Kind = Matreshka.JSON_Types.Boolean_Value;
end Is_Boolean;
--------------
-- Is_Empty --
--------------
function Is_Empty (Self : JSON_Value'Class) return Boolean is
begin
return Self.Data.Value.Kind = Matreshka.JSON_Types.Empty_Value;
end Is_Empty;
---------------------
-- Is_Float_Number --
---------------------
function Is_Float_Number (Self : JSON_Value'Class) return Boolean is
begin
return Self.Data.Value.Kind = Matreshka.JSON_Types.Float_Value;
end Is_Float_Number;
-----------------------
-- Is_Integer_Number --
-----------------------
function Is_Integer_Number (Self : JSON_Value'Class) return Boolean is
begin
return Self.Data.Value.Kind = Matreshka.JSON_Types.Integer_Value;
end Is_Integer_Number;
-------------
-- Is_Null --
-------------
function Is_Null (Self : JSON_Value'Class) return Boolean is
begin
return Self.Data.Value.Kind = Matreshka.JSON_Types.Null_Value;
end Is_Null;
---------------
-- Is_Number --
---------------
function Is_Number (Self : JSON_Value'Class) return Boolean is
begin
return
Self.Data.Value.Kind in Matreshka.JSON_Types.Float_Value
| Matreshka.JSON_Types.Integer_Value;
end Is_Number;
---------------
-- Is_Object --
---------------
function Is_Object (Self : JSON_Value'Class) return Boolean is
begin
return Self.Data.Value.Kind = Matreshka.JSON_Types.Object_Value;
end Is_Object;
---------------
-- Is_String --
---------------
function Is_String (Self : JSON_Value'Class) return Boolean is
begin
return Self.Data.Value.Kind = Matreshka.JSON_Types.String_Value;
end Is_String;
----------
-- Kind --
----------
function Kind (Self : JSON_Value'Class) return JSON_Value_Kinds is
begin
case Self.Data.Value.Kind is
when Matreshka.JSON_Types.Empty_Value =>
return Empty_Value;
when Matreshka.JSON_Types.Boolean_Value =>
return Boolean_Value;
when Matreshka.JSON_Types.Integer_Value =>
return Number_Value;
when Matreshka.JSON_Types.Float_Value =>
return Number_Value;
when Matreshka.JSON_Types.String_Value =>
return String_Value;
when Matreshka.JSON_Types.Array_Value =>
return Array_Value;
when Matreshka.JSON_Types.Object_Value =>
return Object_Value;
when Matreshka.JSON_Types.Null_Value =>
return Null_Value;
end case;
end Kind;
--------------
-- To_Array --
--------------
function To_Array
(Self : JSON_Value'Class;
Default : League.JSON.Arrays.JSON_Array
:= League.JSON.Arrays.Empty_JSON_Array)
return League.JSON.Arrays.JSON_Array is
begin
if Self.Data.Value.Kind = Matreshka.JSON_Types.Array_Value then
return
League.JSON.Arrays.Internals.Create (Self.Data.Value.Array_Value);
else
return Default;
end if;
end To_Array;
----------------
-- To_Boolean --
----------------
function To_Boolean
(Self : JSON_Value'Class; Default : Boolean := False) return Boolean is
begin
if Self.Data.Value.Kind = Matreshka.JSON_Types.Boolean_Value then
return Self.Data.Value.Boolean_Value;
else
return Default;
end if;
end To_Boolean;
--------------
-- To_Float --
--------------
function To_Float
(Self : JSON_Value'Class;
Default : League.Holders.Universal_Float := 0.0)
return League.Holders.Universal_Float is
begin
if Self.Data.Value.Kind = Matreshka.JSON_Types.Float_Value then
return Self.Data.Value.Float_Value;
elsif Self.Data.Value.Kind = Matreshka.JSON_Types.Integer_Value then
return League.Holders.Universal_Float (Self.Data.Value.Integer_Value);
else
return Default;
end if;
end To_Float;
---------------
-- To_Holder --
---------------
function To_Holder (Self : JSON_Value'Class) return League.Holders.Holder is
begin
case Self.Data.Value.Kind is
when Matreshka.JSON_Types.Empty_Value =>
return League.Holders.Empty_Holder;
when Matreshka.JSON_Types.Boolean_Value =>
return
League.Holders.Booleans.To_Holder
(Self.Data.Value.Boolean_Value);
when Matreshka.JSON_Types.Integer_Value =>
return Result : League.Holders.Holder do
League.Holders.Set_Tag
(Result, League.Holders.Universal_Integer_Tag);
League.Holders.Replace_Element
(Result, Self.Data.Value.Integer_Value);
end return;
when Matreshka.JSON_Types.Float_Value =>
return Result : League.Holders.Holder do
League.Holders.Set_Tag
(Result, League.Holders.Universal_Float_Tag);
League.Holders.Replace_Element
(Result, Self.Data.Value.Float_Value);
end return;
when Matreshka.JSON_Types.String_Value =>
return
League.Holders.To_Holder
(League.Strings.Internals.Create
(Self.Data.Value.String_Value));
when Matreshka.JSON_Types.Array_Value =>
return League.Holders.JSON_Arrays.To_Holder
(League.JSON.Arrays.Internals.Create
(Self.Data.Value.Array_Value));
when Matreshka.JSON_Types.Object_Value =>
return League.Holders.JSON_Objects.To_Holder
(League.JSON.Objects.Internals.Create
(Self.Data.Value.Object_Value));
when Matreshka.JSON_Types.Null_Value =>
return League.Holders.Empty_Holder;
end case;
end To_Holder;
----------------
-- To_Integer --
----------------
function To_Integer
(Self : JSON_Value'Class;
Default : League.Holders.Universal_Integer := 0)
return League.Holders.Universal_Integer is
begin
if Self.Data.Value.Kind = Matreshka.JSON_Types.Float_Value then
return League.Holders.Universal_Integer (Self.Data.Value.Float_Value);
elsif Self.Data.Value.Kind = Matreshka.JSON_Types.Integer_Value then
return Self.Data.Value.Integer_Value;
else
return Default;
end if;
end To_Integer;
-------------------
-- To_JSON_Value --
-------------------
function To_JSON_Value (Value : Boolean) return JSON_Value is
begin
return
(Ada.Finalization.Controlled with
Data =>
new Matreshka.JSON_Types.Shared_JSON_Value'
(Counter => <>,
Value =>
(Kind => Matreshka.JSON_Types.Boolean_Value,
Boolean_Value => Value)));
end To_JSON_Value;
-------------------
-- To_JSON_Value --
-------------------
function To_JSON_Value
(Value : League.Holders.Universal_Float) return JSON_Value is
begin
return
(Ada.Finalization.Controlled with
Data =>
new Matreshka.JSON_Types.Shared_JSON_Value'
(Counter => <>,
Value =>
(Kind => Matreshka.JSON_Types.Float_Value,
Float_Value => Value)));
end To_JSON_Value;
-------------------
-- To_JSON_Value --
-------------------
function To_JSON_Value
(Value : League.Holders.Universal_Integer) return JSON_Value is
begin
return
(Ada.Finalization.Controlled with
Data =>
new Matreshka.JSON_Types.Shared_JSON_Value'
(Counter => <>,
Value =>
(Kind => Matreshka.JSON_Types.Integer_Value,
Integer_Value => Value)));
end To_JSON_Value;
-------------------
-- To_JSON_Value --
-------------------
function To_JSON_Value
(Value : League.Strings.Universal_String) return JSON_Value
is
Aux : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Value);
begin
Matreshka.Internals.Strings.Reference (Aux);
return
(Ada.Finalization.Controlled with
Data =>
new Matreshka.JSON_Types.Shared_JSON_Value'
(Counter => <>,
Value =>
(Kind => Matreshka.JSON_Types.String_Value,
String_Value => Aux)));
end To_JSON_Value;
-------------------
-- To_JSON_Value --
-------------------
function To_JSON_Value (Value : League.Holders.Holder) return JSON_Value is
use type League.Holders.Tag;
begin
if League.Holders.Get_Tag (Value)
= League.Holders.Booleans.Value_Tag
then
return To_JSON_Value (League.Holders.Booleans.Element (Value));
elsif League.Holders.Is_Abstract_Integer (Value) then
return
To_JSON_Value
(League.Holders.Universal_Integer'
(League.Holders.Element (Value)));
elsif League.Holders.Is_Abstract_Float (Value) then
return
To_JSON_Value
(League.Holders.Universal_Float'(League.Holders.Element (Value)));
else
return Empty_JSON_Value;
end if;
end To_JSON_Value;
---------------
-- To_Object --
---------------
function To_Object
(Self : JSON_Value'Class;
Default : League.JSON.Objects.JSON_Object
:= League.JSON.Objects.Empty_JSON_Object)
return League.JSON.Objects.JSON_Object is
begin
if Self.Data.Value.Kind = Matreshka.JSON_Types.Object_Value then
return
League.JSON.Objects.Internals.Create (Self.Data.Value.Object_Value);
else
return Default;
end if;
end To_Object;
---------------
-- To_String --
---------------
function To_String
(Self : JSON_Value'Class;
Default : League.Strings.Universal_String
:= League.Strings.Empty_Universal_String)
return League.Strings.Universal_String is
begin
if Self.Data.Value.Kind = Matreshka.JSON_Types.String_Value then
return League.Strings.Internals.Create (Self.Data.Value.String_Value);
else
return Default;
end if;
end To_String;
end League.JSON.Values;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- I N T E R F A C E S . C O B O L --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- The body of Interfaces.COBOL is implementation independent (i.e. the same
-- version is used with all versions of GNAT). The specialization to a
-- particular COBOL format is completely contained in the private part of
-- the spec.
with Interfaces; use Interfaces;
with System; use System;
with Unchecked_Conversion;
package body Interfaces.COBOL is
-----------------------------------------------
-- Declarations for External Binary Handling --
-----------------------------------------------
subtype B1 is Byte_Array (1 .. 1);
subtype B2 is Byte_Array (1 .. 2);
subtype B4 is Byte_Array (1 .. 4);
subtype B8 is Byte_Array (1 .. 8);
-- Representations for 1,2,4,8 byte binary values
function To_B1 is new Unchecked_Conversion (Integer_8, B1);
function To_B2 is new Unchecked_Conversion (Integer_16, B2);
function To_B4 is new Unchecked_Conversion (Integer_32, B4);
function To_B8 is new Unchecked_Conversion (Integer_64, B8);
-- Conversions from native binary to external binary
function From_B1 is new Unchecked_Conversion (B1, Integer_8);
function From_B2 is new Unchecked_Conversion (B2, Integer_16);
function From_B4 is new Unchecked_Conversion (B4, Integer_32);
function From_B8 is new Unchecked_Conversion (B8, Integer_64);
-- Conversions from external binary to signed native binary
function From_B1U is new Unchecked_Conversion (B1, Unsigned_8);
function From_B2U is new Unchecked_Conversion (B2, Unsigned_16);
function From_B4U is new Unchecked_Conversion (B4, Unsigned_32);
function From_B8U is new Unchecked_Conversion (B8, Unsigned_64);
-- Conversions from external binary to unsigned native binary
-----------------------
-- Local Subprograms --
-----------------------
function Binary_To_Decimal
(Item : Byte_Array;
Format : Binary_Format) return Integer_64;
-- This function converts a numeric value in the given format to its
-- corresponding integer value. This is the non-generic implementation
-- of Decimal_Conversions.To_Decimal. The generic routine does the
-- final conversion to the fixed-point format.
function Numeric_To_Decimal
(Item : Numeric;
Format : Display_Format) return Integer_64;
-- This function converts a numeric value in the given format to its
-- corresponding integer value. This is the non-generic implementation
-- of Decimal_Conversions.To_Decimal. The generic routine does the
-- final conversion to the fixed-point format.
function Packed_To_Decimal
(Item : Packed_Decimal;
Format : Packed_Format) return Integer_64;
-- This function converts a packed value in the given format to its
-- corresponding integer value. This is the non-generic implementation
-- of Decimal_Conversions.To_Decimal. The generic routine does the
-- final conversion to the fixed-point format.
procedure Swap (B : in out Byte_Array; F : Binary_Format);
-- Swaps the bytes if required by the binary format F
function To_Display
(Item : Integer_64;
Format : Display_Format;
Length : Natural) return Numeric;
-- This function converts the given integer value into display format,
-- using the given format, with the length in bytes of the result given
-- by the last parameter. This is the non-generic implementation of
-- Decimal_Conversions.To_Display. The conversion of the item from its
-- original decimal format to Integer_64 is done by the generic routine.
function To_Packed
(Item : Integer_64;
Format : Packed_Format;
Length : Natural) return Packed_Decimal;
-- This function converts the given integer value into packed format,
-- using the given format, with the length in digits of the result given
-- by the last parameter. This is the non-generic implementation of
-- Decimal_Conversions.To_Display. The conversion of the item from its
-- original decimal format to Integer_64 is done by the generic routine.
function Valid_Numeric
(Item : Numeric;
Format : Display_Format) return Boolean;
-- This is the non-generic implementation of Decimal_Conversions.Valid
-- for the display case.
function Valid_Packed
(Item : Packed_Decimal;
Format : Packed_Format) return Boolean;
-- This is the non-generic implementation of Decimal_Conversions.Valid
-- for the packed case.
-----------------------
-- Binary_To_Decimal --
-----------------------
function Binary_To_Decimal
(Item : Byte_Array;
Format : Binary_Format) return Integer_64
is
Len : constant Natural := Item'Length;
begin
if Len = 1 then
if Format in Binary_Unsigned_Format then
return Integer_64 (From_B1U (Item));
else
return Integer_64 (From_B1 (Item));
end if;
elsif Len = 2 then
declare
R : B2 := Item;
begin
Swap (R, Format);
if Format in Binary_Unsigned_Format then
return Integer_64 (From_B2U (R));
else
return Integer_64 (From_B2 (R));
end if;
end;
elsif Len = 4 then
declare
R : B4 := Item;
begin
Swap (R, Format);
if Format in Binary_Unsigned_Format then
return Integer_64 (From_B4U (R));
else
return Integer_64 (From_B4 (R));
end if;
end;
elsif Len = 8 then
declare
R : B8 := Item;
begin
Swap (R, Format);
if Format in Binary_Unsigned_Format then
return Integer_64 (From_B8U (R));
else
return Integer_64 (From_B8 (R));
end if;
end;
-- Length is not 1, 2, 4 or 8
else
raise Conversion_Error;
end if;
end Binary_To_Decimal;
------------------------
-- Numeric_To_Decimal --
------------------------
-- The following assumptions are made in the coding of this routine:
-- The range of COBOL_Digits is compact and the ten values
-- represent the digits 0-9 in sequence
-- The range of COBOL_Plus_Digits is compact and the ten values
-- represent the digits 0-9 in sequence with a plus sign.
-- The range of COBOL_Minus_Digits is compact and the ten values
-- represent the digits 0-9 in sequence with a minus sign.
-- The COBOL_Minus_Digits set is disjoint from COBOL_Digits
-- These assumptions are true for all COBOL representations we know of
function Numeric_To_Decimal
(Item : Numeric;
Format : Display_Format) return Integer_64
is
pragma Unsuppress (Range_Check);
Sign : COBOL_Character := COBOL_Plus;
Result : Integer_64 := 0;
begin
if not Valid_Numeric (Item, Format) then
raise Conversion_Error;
end if;
for J in Item'Range loop
declare
K : constant COBOL_Character := Item (J);
begin
if K in COBOL_Digits then
Result := Result * 10 +
(COBOL_Character'Pos (K) -
COBOL_Character'Pos (COBOL_Digits'First));
elsif K in COBOL_Plus_Digits then
Result := Result * 10 +
(COBOL_Character'Pos (K) -
COBOL_Character'Pos (COBOL_Plus_Digits'First));
elsif K in COBOL_Minus_Digits then
Result := Result * 10 +
(COBOL_Character'Pos (K) -
COBOL_Character'Pos (COBOL_Minus_Digits'First));
Sign := COBOL_Minus;
-- Only remaining possibility is COBOL_Plus or COBOL_Minus
else
Sign := K;
end if;
end;
end loop;
if Sign = COBOL_Plus then
return Result;
else
return -Result;
end if;
exception
when Constraint_Error =>
raise Conversion_Error;
end Numeric_To_Decimal;
-----------------------
-- Packed_To_Decimal --
-----------------------
function Packed_To_Decimal
(Item : Packed_Decimal;
Format : Packed_Format) return Integer_64
is
pragma Unsuppress (Range_Check);
Result : Integer_64 := 0;
Sign : constant Decimal_Element := Item (Item'Last);
begin
if not Valid_Packed (Item, Format) then
raise Conversion_Error;
end if;
case Packed_Representation is
when IBM =>
for J in Item'First .. Item'Last - 1 loop
Result := Result * 10 + Integer_64 (Item (J));
end loop;
if Sign = 16#0B# or else Sign = 16#0D# then
return -Result;
else
return +Result;
end if;
end case;
exception
when Constraint_Error =>
raise Conversion_Error;
end Packed_To_Decimal;
----------
-- Swap --
----------
procedure Swap (B : in out Byte_Array; F : Binary_Format) is
Little_Endian : constant Boolean :=
System.Default_Bit_Order = System.Low_Order_First;
begin
-- Return if no swap needed
case F is
when H | HU =>
if not Little_Endian then
return;
end if;
when L | LU =>
if Little_Endian then
return;
end if;
when N | NU =>
return;
end case;
-- Here a swap is needed
declare
Len : constant Natural := B'Length;
begin
for J in 1 .. Len / 2 loop
declare
Temp : constant Byte := B (J);
begin
B (J) := B (Len + 1 - J);
B (Len + 1 - J) := Temp;
end;
end loop;
end;
end Swap;
-----------------------
-- To_Ada (function) --
-----------------------
function To_Ada (Item : Alphanumeric) return String is
Result : String (Item'Range);
begin
for J in Item'Range loop
Result (J) := COBOL_To_Ada (Item (J));
end loop;
return Result;
end To_Ada;
------------------------
-- To_Ada (procedure) --
------------------------
procedure To_Ada
(Item : Alphanumeric;
Target : out String;
Last : out Natural)
is
Last_Val : Integer;
begin
if Item'Length > Target'Length then
raise Constraint_Error;
end if;
Last_Val := Target'First - 1;
for J in Item'Range loop
Last_Val := Last_Val + 1;
Target (Last_Val) := COBOL_To_Ada (Item (J));
end loop;
Last := Last_Val;
end To_Ada;
-------------------------
-- To_COBOL (function) --
-------------------------
function To_COBOL (Item : String) return Alphanumeric is
Result : Alphanumeric (Item'Range);
begin
for J in Item'Range loop
Result (J) := Ada_To_COBOL (Item (J));
end loop;
return Result;
end To_COBOL;
--------------------------
-- To_COBOL (procedure) --
--------------------------
procedure To_COBOL
(Item : String;
Target : out Alphanumeric;
Last : out Natural)
is
Last_Val : Integer;
begin
if Item'Length > Target'Length then
raise Constraint_Error;
end if;
Last_Val := Target'First - 1;
for J in Item'Range loop
Last_Val := Last_Val + 1;
Target (Last_Val) := Ada_To_COBOL (Item (J));
end loop;
Last := Last_Val;
end To_COBOL;
----------------
-- To_Display --
----------------
function To_Display
(Item : Integer_64;
Format : Display_Format;
Length : Natural) return Numeric
is
Result : Numeric (1 .. Length);
Val : Integer_64 := Item;
procedure Convert (First, Last : Natural);
-- Convert the number in Val into COBOL_Digits, storing the result
-- in Result (First .. Last). Raise Conversion_Error if too large.
procedure Embed_Sign (Loc : Natural);
-- Used for the nonseparate formats to embed the appropriate sign
-- at the specified location (i.e. at Result (Loc))
procedure Convert (First, Last : Natural) is
J : Natural := Last;
begin
while J >= First loop
Result (J) :=
COBOL_Character'Val
(COBOL_Character'Pos (COBOL_Digits'First) +
Integer (Val mod 10));
Val := Val / 10;
if Val = 0 then
for K in First .. J - 1 loop
Result (J) := COBOL_Digits'First;
end loop;
return;
else
J := J - 1;
end if;
end loop;
raise Conversion_Error;
end Convert;
procedure Embed_Sign (Loc : Natural) is
Digit : Natural range 0 .. 9;
begin
Digit := COBOL_Character'Pos (Result (Loc)) -
COBOL_Character'Pos (COBOL_Digits'First);
if Item >= 0 then
Result (Loc) :=
COBOL_Character'Val
(COBOL_Character'Pos (COBOL_Plus_Digits'First) + Digit);
else
Result (Loc) :=
COBOL_Character'Val
(COBOL_Character'Pos (COBOL_Minus_Digits'First) + Digit);
end if;
end Embed_Sign;
-- Start of processing for To_Display
begin
case Format is
when Unsigned =>
if Val < 0 then
raise Conversion_Error;
else
Convert (1, Length);
end if;
when Leading_Separate =>
if Val < 0 then
Result (1) := COBOL_Minus;
Val := -Val;
else
Result (1) := COBOL_Plus;
end if;
Convert (2, Length);
when Trailing_Separate =>
if Val < 0 then
Result (Length) := COBOL_Minus;
Val := -Val;
else
Result (Length) := COBOL_Plus;
end if;
Convert (1, Length - 1);
when Leading_Nonseparate =>
Val := abs Val;
Convert (1, Length);
Embed_Sign (1);
when Trailing_Nonseparate =>
Val := abs Val;
Convert (1, Length);
Embed_Sign (Length);
end case;
return Result;
end To_Display;
---------------
-- To_Packed --
---------------
function To_Packed
(Item : Integer_64;
Format : Packed_Format;
Length : Natural) return Packed_Decimal
is
Result : Packed_Decimal (1 .. Length);
Val : Integer_64;
procedure Convert (First, Last : Natural);
-- Convert the number in Val into a sequence of Decimal_Element values,
-- storing the result in Result (First .. Last). Raise Conversion_Error
-- if the value is too large to fit.
procedure Convert (First, Last : Natural) is
J : Natural := Last;
begin
while J >= First loop
Result (J) := Decimal_Element (Val mod 10);
Val := Val / 10;
if Val = 0 then
for K in First .. J - 1 loop
Result (K) := 0;
end loop;
return;
else
J := J - 1;
end if;
end loop;
raise Conversion_Error;
end Convert;
-- Start of processing for To_Packed
begin
case Packed_Representation is
when IBM =>
if Format = Packed_Unsigned then
if Item < 0 then
raise Conversion_Error;
else
Result (Length) := 16#F#;
Val := Item;
end if;
elsif Item >= 0 then
Result (Length) := 16#C#;
Val := Item;
else -- Item < 0
Result (Length) := 16#D#;
Val := -Item;
end if;
Convert (1, Length - 1);
return Result;
end case;
end To_Packed;
-------------------
-- Valid_Numeric --
-------------------
function Valid_Numeric
(Item : Numeric;
Format : Display_Format) return Boolean
is
begin
if Item'Length = 0 then
return False;
end if;
-- All character positions except first and last must be Digits.
-- This is true for all the formats.
for J in Item'First + 1 .. Item'Last - 1 loop
if Item (J) not in COBOL_Digits then
return False;
end if;
end loop;
case Format is
when Unsigned =>
return Item (Item'First) in COBOL_Digits
and then Item (Item'Last) in COBOL_Digits;
when Leading_Separate =>
return (Item (Item'First) = COBOL_Plus or else
Item (Item'First) = COBOL_Minus)
and then Item (Item'Last) in COBOL_Digits;
when Trailing_Separate =>
return Item (Item'First) in COBOL_Digits
and then
(Item (Item'Last) = COBOL_Plus or else
Item (Item'Last) = COBOL_Minus);
when Leading_Nonseparate =>
return (Item (Item'First) in COBOL_Plus_Digits or else
Item (Item'First) in COBOL_Minus_Digits)
and then Item (Item'Last) in COBOL_Digits;
when Trailing_Nonseparate =>
return Item (Item'First) in COBOL_Digits
and then
(Item (Item'Last) in COBOL_Plus_Digits or else
Item (Item'Last) in COBOL_Minus_Digits);
end case;
end Valid_Numeric;
------------------
-- Valid_Packed --
------------------
function Valid_Packed
(Item : Packed_Decimal;
Format : Packed_Format) return Boolean
is
begin
case Packed_Representation is
when IBM =>
for J in Item'First .. Item'Last - 1 loop
if Item (J) > 9 then
return False;
end if;
end loop;
-- For unsigned, sign digit must be F
if Format = Packed_Unsigned then
return Item (Item'Last) = 16#F#;
-- For signed, accept all standard and non-standard signs
else
return Item (Item'Last) in 16#A# .. 16#F#;
end if;
end case;
end Valid_Packed;
-------------------------
-- Decimal_Conversions --
-------------------------
package body Decimal_Conversions is
---------------------
-- Length (binary) --
---------------------
-- Note that the tests here are all compile time tests
function Length (Format : Binary_Format) return Natural is
pragma Unreferenced (Format);
begin
if Num'Digits <= 2 then
return 1;
elsif Num'Digits <= 4 then
return 2;
elsif Num'Digits <= 9 then
return 4;
else -- Num'Digits in 10 .. 18
return 8;
end if;
end Length;
----------------------
-- Length (display) --
----------------------
function Length (Format : Display_Format) return Natural is
begin
if Format = Leading_Separate or else Format = Trailing_Separate then
return Num'Digits + 1;
else
return Num'Digits;
end if;
end Length;
---------------------
-- Length (packed) --
---------------------
-- Note that the tests here are all compile time checks
function Length
(Format : Packed_Format) return Natural
is
pragma Unreferenced (Format);
begin
case Packed_Representation is
when IBM =>
return (Num'Digits + 2) / 2 * 2;
end case;
end Length;
---------------
-- To_Binary --
---------------
function To_Binary
(Item : Num;
Format : Binary_Format) return Byte_Array
is
begin
-- Note: all these tests are compile time tests
if Num'Digits <= 2 then
return To_B1 (Integer_8'Integer_Value (Item));
elsif Num'Digits <= 4 then
declare
R : B2 := To_B2 (Integer_16'Integer_Value (Item));
begin
Swap (R, Format);
return R;
end;
elsif Num'Digits <= 9 then
declare
R : B4 := To_B4 (Integer_32'Integer_Value (Item));
begin
Swap (R, Format);
return R;
end;
else -- Num'Digits in 10 .. 18
declare
R : B8 := To_B8 (Integer_64'Integer_Value (Item));
begin
Swap (R, Format);
return R;
end;
end if;
exception
when Constraint_Error =>
raise Conversion_Error;
end To_Binary;
---------------------------------
-- To_Binary (internal binary) --
---------------------------------
function To_Binary (Item : Num) return Binary is
pragma Unsuppress (Range_Check);
begin
return Binary'Integer_Value (Item);
exception
when Constraint_Error =>
raise Conversion_Error;
end To_Binary;
-------------------------
-- To_Decimal (binary) --
-------------------------
function To_Decimal
(Item : Byte_Array;
Format : Binary_Format) return Num
is
pragma Unsuppress (Range_Check);
begin
return Num'Fixed_Value (Binary_To_Decimal (Item, Format));
exception
when Constraint_Error =>
raise Conversion_Error;
end To_Decimal;
----------------------------------
-- To_Decimal (internal binary) --
----------------------------------
function To_Decimal (Item : Binary) return Num is
pragma Unsuppress (Range_Check);
begin
return Num'Fixed_Value (Item);
exception
when Constraint_Error =>
raise Conversion_Error;
end To_Decimal;
--------------------------
-- To_Decimal (display) --
--------------------------
function To_Decimal
(Item : Numeric;
Format : Display_Format) return Num
is
pragma Unsuppress (Range_Check);
begin
return Num'Fixed_Value (Numeric_To_Decimal (Item, Format));
exception
when Constraint_Error =>
raise Conversion_Error;
end To_Decimal;
---------------------------------------
-- To_Decimal (internal long binary) --
---------------------------------------
function To_Decimal (Item : Long_Binary) return Num is
pragma Unsuppress (Range_Check);
begin
return Num'Fixed_Value (Item);
exception
when Constraint_Error =>
raise Conversion_Error;
end To_Decimal;
-------------------------
-- To_Decimal (packed) --
-------------------------
function To_Decimal
(Item : Packed_Decimal;
Format : Packed_Format) return Num
is
pragma Unsuppress (Range_Check);
begin
return Num'Fixed_Value (Packed_To_Decimal (Item, Format));
exception
when Constraint_Error =>
raise Conversion_Error;
end To_Decimal;
----------------
-- To_Display --
----------------
function To_Display
(Item : Num;
Format : Display_Format) return Numeric
is
pragma Unsuppress (Range_Check);
begin
return
To_Display
(Integer_64'Integer_Value (Item),
Format,
Length (Format));
exception
when Constraint_Error =>
raise Conversion_Error;
end To_Display;
--------------------
-- To_Long_Binary --
--------------------
function To_Long_Binary (Item : Num) return Long_Binary is
pragma Unsuppress (Range_Check);
begin
return Long_Binary'Integer_Value (Item);
exception
when Constraint_Error =>
raise Conversion_Error;
end To_Long_Binary;
---------------
-- To_Packed --
---------------
function To_Packed
(Item : Num;
Format : Packed_Format) return Packed_Decimal
is
pragma Unsuppress (Range_Check);
begin
return
To_Packed
(Integer_64'Integer_Value (Item),
Format,
Length (Format));
exception
when Constraint_Error =>
raise Conversion_Error;
end To_Packed;
--------------------
-- Valid (binary) --
--------------------
function Valid
(Item : Byte_Array;
Format : Binary_Format) return Boolean
is
Val : Num;
pragma Unreferenced (Val);
begin
Val := To_Decimal (Item, Format);
return True;
exception
when Conversion_Error =>
return False;
end Valid;
---------------------
-- Valid (display) --
---------------------
function Valid
(Item : Numeric;
Format : Display_Format) return Boolean
is
begin
return Valid_Numeric (Item, Format);
end Valid;
--------------------
-- Valid (packed) --
--------------------
function Valid
(Item : Packed_Decimal;
Format : Packed_Format) return Boolean
is
begin
return Valid_Packed (Item, Format);
end Valid;
end Decimal_Conversions;
end Interfaces.COBOL;
|
-- Copyright 2008 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package body Types is
function Ident (O : Object'Class) return Object'Class is
begin
return O;
end Ident;
procedure Do_Nothing (O : in out Object'Class) is
begin
null;
end Do_Nothing;
end Types;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Internals.UML_Elements;
with AMF.Standard_Profile_L3.Build_Components;
with AMF.UML.Components;
with AMF.Visitors;
package AMF.Internals.Standard_Profile_L3_Build_Components is
type Standard_Profile_L3_Build_Component_Proxy is
limited new AMF.Internals.UML_Elements.UML_Element_Base
and AMF.Standard_Profile_L3.Build_Components.Standard_Profile_L3_Build_Component with null record;
overriding function Get_Base_Component
(Self : not null access constant Standard_Profile_L3_Build_Component_Proxy)
return AMF.UML.Components.UML_Component_Access;
-- Getter of BuildComponent::base_Component.
--
overriding procedure Set_Base_Component
(Self : not null access Standard_Profile_L3_Build_Component_Proxy;
To : AMF.UML.Components.UML_Component_Access);
-- Setter of BuildComponent::base_Component.
--
overriding procedure Enter_Element
(Self : not null access constant Standard_Profile_L3_Build_Component_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
overriding procedure Leave_Element
(Self : not null access constant Standard_Profile_L3_Build_Component_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
overriding procedure Visit_Element
(Self : not null access constant Standard_Profile_L3_Build_Component_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
end AMF.Internals.Standard_Profile_L3_Build_Components;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Internals.Generic_Element_Table;
with AMF.Internals.Tables.UML_Types;
package AMF.Internals.Tables.UML_Element_Table is
new AMF.Internals.Generic_Element_Table
(AMF.Internals.Tables.UML_Types.Element_Record);
pragma Preelaborate (AMF.Internals.Tables.UML_Element_Table);
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . O R D E R E D _ M U L T I S E T S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2004-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with Ada.Containers.Red_Black_Trees.Generic_Operations;
pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Operations);
with Ada.Containers.Red_Black_Trees.Generic_Keys;
pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Keys);
with Ada.Containers.Red_Black_Trees.Generic_Set_Operations;
pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Set_Operations);
with System; use type System.Address;
package body Ada.Containers.Ordered_Multisets is
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
-----------------------------
-- Node Access Subprograms --
-----------------------------
-- These subprograms provide a functional interface to access fields
-- of a node, and a procedural interface for modifying these values.
function Color (Node : Node_Access) return Color_Type;
pragma Inline (Color);
function Left (Node : Node_Access) return Node_Access;
pragma Inline (Left);
function Parent (Node : Node_Access) return Node_Access;
pragma Inline (Parent);
function Right (Node : Node_Access) return Node_Access;
pragma Inline (Right);
procedure Set_Parent (Node : Node_Access; Parent : Node_Access);
pragma Inline (Set_Parent);
procedure Set_Left (Node : Node_Access; Left : Node_Access);
pragma Inline (Set_Left);
procedure Set_Right (Node : Node_Access; Right : Node_Access);
pragma Inline (Set_Right);
procedure Set_Color (Node : Node_Access; Color : Color_Type);
pragma Inline (Set_Color);
-----------------------
-- Local Subprograms --
-----------------------
function Copy_Node (Source : Node_Access) return Node_Access;
pragma Inline (Copy_Node);
procedure Free (X : in out Node_Access);
procedure Insert_Sans_Hint
(Tree : in out Tree_Type;
New_Item : Element_Type;
Node : out Node_Access);
procedure Insert_With_Hint
(Dst_Tree : in out Tree_Type;
Dst_Hint : Node_Access;
Src_Node : Node_Access;
Dst_Node : out Node_Access);
function Is_Equal_Node_Node (L, R : Node_Access) return Boolean;
pragma Inline (Is_Equal_Node_Node);
function Is_Greater_Element_Node
(Left : Element_Type;
Right : Node_Access) return Boolean;
pragma Inline (Is_Greater_Element_Node);
function Is_Less_Element_Node
(Left : Element_Type;
Right : Node_Access) return Boolean;
pragma Inline (Is_Less_Element_Node);
function Is_Less_Node_Node (L, R : Node_Access) return Boolean;
pragma Inline (Is_Less_Node_Node);
procedure Replace_Element
(Tree : in out Tree_Type;
Node : Node_Access;
Item : Element_Type);
--------------------------
-- Local Instantiations --
--------------------------
package Tree_Operations is
new Red_Black_Trees.Generic_Operations (Tree_Types);
procedure Delete_Tree is
new Tree_Operations.Generic_Delete_Tree (Free);
function Copy_Tree is
new Tree_Operations.Generic_Copy_Tree (Copy_Node, Delete_Tree);
use Tree_Operations;
function Is_Equal is
new Tree_Operations.Generic_Equal (Is_Equal_Node_Node);
package Element_Keys is
new Red_Black_Trees.Generic_Keys
(Tree_Operations => Tree_Operations,
Key_Type => Element_Type,
Is_Less_Key_Node => Is_Less_Element_Node,
Is_Greater_Key_Node => Is_Greater_Element_Node);
package Set_Ops is
new Generic_Set_Operations
(Tree_Operations => Tree_Operations,
Insert_With_Hint => Insert_With_Hint,
Copy_Tree => Copy_Tree,
Delete_Tree => Delete_Tree,
Is_Less => Is_Less_Node_Node,
Free => Free);
---------
-- "<" --
---------
function "<" (Left, Right : Cursor) return Boolean is
begin
if Left.Node = null then
raise Constraint_Error with "Left cursor equals No_Element";
end if;
if Right.Node = null then
raise Constraint_Error with "Right cursor equals No_Element";
end if;
pragma Assert (Vet (Left.Container.Tree, Left.Node),
"bad Left cursor in ""<""");
pragma Assert (Vet (Right.Container.Tree, Right.Node),
"bad Right cursor in ""<""");
return Left.Node.Element < Right.Node.Element;
end "<";
function "<" (Left : Cursor; Right : Element_Type)
return Boolean is
begin
if Left.Node = null then
raise Constraint_Error with "Left cursor equals No_Element";
end if;
pragma Assert (Vet (Left.Container.Tree, Left.Node),
"bad Left cursor in ""<""");
return Left.Node.Element < Right;
end "<";
function "<" (Left : Element_Type; Right : Cursor)
return Boolean is
begin
if Right.Node = null then
raise Constraint_Error with "Right cursor equals No_Element";
end if;
pragma Assert (Vet (Right.Container.Tree, Right.Node),
"bad Right cursor in ""<""");
return Left < Right.Node.Element;
end "<";
---------
-- "=" --
---------
function "=" (Left, Right : Set) return Boolean is
begin
return Is_Equal (Left.Tree, Right.Tree);
end "=";
---------
-- ">" --
---------
function ">" (Left, Right : Cursor) return Boolean is
begin
if Left.Node = null then
raise Constraint_Error with "Left cursor equals No_Element";
end if;
if Right.Node = null then
raise Constraint_Error with "Right cursor equals No_Element";
end if;
pragma Assert (Vet (Left.Container.Tree, Left.Node),
"bad Left cursor in "">""");
pragma Assert (Vet (Right.Container.Tree, Right.Node),
"bad Right cursor in "">""");
-- L > R same as R < L
return Right.Node.Element < Left.Node.Element;
end ">";
function ">" (Left : Cursor; Right : Element_Type)
return Boolean is
begin
if Left.Node = null then
raise Constraint_Error with "Left cursor equals No_Element";
end if;
pragma Assert (Vet (Left.Container.Tree, Left.Node),
"bad Left cursor in "">""");
return Right < Left.Node.Element;
end ">";
function ">" (Left : Element_Type; Right : Cursor)
return Boolean is
begin
if Right.Node = null then
raise Constraint_Error with "Right cursor equals No_Element";
end if;
pragma Assert (Vet (Right.Container.Tree, Right.Node),
"bad Right cursor in "">""");
return Right.Node.Element < Left;
end ">";
------------
-- Adjust --
------------
procedure Adjust is new Tree_Operations.Generic_Adjust (Copy_Tree);
procedure Adjust (Container : in out Set) is
begin
Adjust (Container.Tree);
end Adjust;
------------
-- Assign --
------------
procedure Assign (Target : in out Set; Source : Set) is
begin
if Target'Address = Source'Address then
return;
end if;
Target.Clear;
Target.Union (Source);
end Assign;
-------------
-- Ceiling --
-------------
function Ceiling (Container : Set; Item : Element_Type) return Cursor is
Node : constant Node_Access :=
Element_Keys.Ceiling (Container.Tree, Item);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Ceiling;
-----------
-- Clear --
-----------
procedure Clear is
new Tree_Operations.Generic_Clear (Delete_Tree);
procedure Clear (Container : in out Set) is
begin
Clear (Container.Tree);
end Clear;
-----------
-- Color --
-----------
function Color (Node : Node_Access) return Color_Type is
begin
return Node.Color;
end Color;
------------------------
-- Constant_Reference --
------------------------
function Constant_Reference
(Container : aliased Set;
Position : Cursor) return Constant_Reference_Type
is
begin
if Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with
"Position cursor designates wrong container";
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Constant_Reference");
-- Note: in predefined container units, the creation of a reference
-- increments the busy bit of the container, and its finalization
-- decrements it. In the absence of control machinery, this tampering
-- protection is missing.
declare
T : Tree_Type renames Container.Tree'Unrestricted_Access.all;
pragma Unreferenced (T);
begin
return R : constant Constant_Reference_Type :=
(Element => Position.Node.Element'Unrestricted_Access,
Control => (Container => Container'Unrestricted_Access))
do
null;
end return;
end;
end Constant_Reference;
--------------
-- Contains --
--------------
function Contains (Container : Set; Item : Element_Type) return Boolean is
begin
return Find (Container, Item) /= No_Element;
end Contains;
----------
-- Copy --
----------
function Copy (Source : Set) return Set is
begin
return Target : Set do
Target.Assign (Source);
end return;
end Copy;
---------------
-- Copy_Node --
---------------
function Copy_Node (Source : Node_Access) return Node_Access is
Target : constant Node_Access :=
new Node_Type'(Parent => null,
Left => null,
Right => null,
Color => Source.Color,
Element => Source.Element);
begin
return Target;
end Copy_Node;
------------
-- Delete --
------------
procedure Delete (Container : in out Set; Item : Element_Type) is
Tree : Tree_Type renames Container.Tree;
Node : Node_Access := Element_Keys.Ceiling (Tree, Item);
Done : constant Node_Access := Element_Keys.Upper_Bound (Tree, Item);
X : Node_Access;
begin
if Node = Done then
raise Constraint_Error with
"attempt to delete element not in set";
end if;
loop
X := Node;
Node := Tree_Operations.Next (Node);
Tree_Operations.Delete_Node_Sans_Free (Tree, X);
Free (X);
exit when Node = Done;
end loop;
end Delete;
procedure Delete (Container : in out Set; Position : in out Cursor) is
begin
if Position.Node = null then
raise Constraint_Error with "Position cursor equals No_Element";
end if;
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with "Position cursor designates wrong set";
end if;
pragma Assert (Vet (Container.Tree, Position.Node),
"bad cursor in Delete");
Delete_Node_Sans_Free (Container.Tree, Position.Node);
Free (Position.Node);
Position.Container := null;
end Delete;
------------------
-- Delete_First --
------------------
procedure Delete_First (Container : in out Set) is
Tree : Tree_Type renames Container.Tree;
X : Node_Access := Tree.First;
begin
if X = null then
return;
end if;
Tree_Operations.Delete_Node_Sans_Free (Tree, X);
Free (X);
end Delete_First;
-----------------
-- Delete_Last --
-----------------
procedure Delete_Last (Container : in out Set) is
Tree : Tree_Type renames Container.Tree;
X : Node_Access := Tree.Last;
begin
if X = null then
return;
end if;
Tree_Operations.Delete_Node_Sans_Free (Tree, X);
Free (X);
end Delete_Last;
----------------
-- Difference --
----------------
procedure Difference (Target : in out Set; Source : Set) is
begin
Set_Ops.Difference (Target.Tree, Source.Tree);
end Difference;
function Difference (Left, Right : Set) return Set is
Tree : constant Tree_Type :=
Set_Ops.Difference (Left.Tree, Right.Tree);
begin
return Set'(Controlled with Tree);
end Difference;
-------------
-- Element --
-------------
function Element (Position : Cursor) return Element_Type is
begin
if Position.Node = null then
raise Constraint_Error with "Position cursor equals No_Element";
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Element");
return Position.Node.Element;
end Element;
-------------------------
-- Equivalent_Elements --
-------------------------
function Equivalent_Elements (Left, Right : Element_Type) return Boolean is
begin
if Left < Right
or else Right < Left
then
return False;
else
return True;
end if;
end Equivalent_Elements;
---------------------
-- Equivalent_Sets --
---------------------
function Equivalent_Sets (Left, Right : Set) return Boolean is
function Is_Equivalent_Node_Node (L, R : Node_Access) return Boolean;
pragma Inline (Is_Equivalent_Node_Node);
function Is_Equivalent is
new Tree_Operations.Generic_Equal (Is_Equivalent_Node_Node);
-----------------------------
-- Is_Equivalent_Node_Node --
-----------------------------
function Is_Equivalent_Node_Node (L, R : Node_Access) return Boolean is
begin
if L.Element < R.Element then
return False;
elsif R.Element < L.Element then
return False;
else
return True;
end if;
end Is_Equivalent_Node_Node;
-- Start of processing for Equivalent_Sets
begin
return Is_Equivalent (Left.Tree, Right.Tree);
end Equivalent_Sets;
-------------
-- Exclude --
-------------
procedure Exclude (Container : in out Set; Item : Element_Type) is
Tree : Tree_Type renames Container.Tree;
Node : Node_Access := Element_Keys.Ceiling (Tree, Item);
Done : constant Node_Access := Element_Keys.Upper_Bound (Tree, Item);
X : Node_Access;
begin
while Node /= Done loop
X := Node;
Node := Tree_Operations.Next (Node);
Tree_Operations.Delete_Node_Sans_Free (Tree, X);
Free (X);
end loop;
end Exclude;
--------------
-- Finalize --
--------------
procedure Finalize (Object : in out Iterator) is
begin
Unbusy (Object.Container.Tree.TC);
end Finalize;
----------
-- Find --
----------
function Find (Container : Set; Item : Element_Type) return Cursor is
Node : constant Node_Access :=
Element_Keys.Find (Container.Tree, Item);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Find;
-----------
-- First --
-----------
function First (Container : Set) return Cursor is
begin
if Container.Tree.First = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Container.Tree.First);
end First;
function First (Object : Iterator) return Cursor is
begin
-- The value of the iterator object's Node component influences the
-- behavior of the First (and Last) selector function.
-- When the Node component is null, this means the iterator object was
-- constructed without a start expression, in which case the (forward)
-- iteration starts from the (logical) beginning of the entire sequence
-- of items (corresponding to Container.First, for a forward iterator).
-- Otherwise, this is iteration over a partial sequence of items. When
-- the Node component is non-null, the iterator object was constructed
-- with a start expression, that specifies the position from which the
-- (forward) partial iteration begins.
if Object.Node = null then
return Object.Container.First;
else
return Cursor'(Object.Container, Object.Node);
end if;
end First;
-------------------
-- First_Element --
-------------------
function First_Element (Container : Set) return Element_Type is
begin
if Container.Tree.First = null then
raise Constraint_Error with "set is empty";
end if;
return Container.Tree.First.Element;
end First_Element;
-----------
-- Floor --
-----------
function Floor (Container : Set; Item : Element_Type) return Cursor is
Node : constant Node_Access :=
Element_Keys.Floor (Container.Tree, Item);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Floor;
----------
-- Free --
----------
procedure Free (X : in out Node_Access) is
procedure Deallocate is
new Ada.Unchecked_Deallocation (Node_Type, Node_Access);
begin
if X /= null then
X.Parent := X;
X.Left := X;
X.Right := X;
Deallocate (X);
end if;
end Free;
------------------
-- Generic_Keys --
------------------
package body Generic_Keys is
-----------------------
-- Local Subprograms --
-----------------------
function Is_Greater_Key_Node
(Left : Key_Type;
Right : Node_Access) return Boolean;
pragma Inline (Is_Greater_Key_Node);
function Is_Less_Key_Node
(Left : Key_Type;
Right : Node_Access) return Boolean;
pragma Inline (Is_Less_Key_Node);
--------------------------
-- Local_Instantiations --
--------------------------
package Key_Keys is
new Red_Black_Trees.Generic_Keys
(Tree_Operations => Tree_Operations,
Key_Type => Key_Type,
Is_Less_Key_Node => Is_Less_Key_Node,
Is_Greater_Key_Node => Is_Greater_Key_Node);
-------------
-- Ceiling --
-------------
function Ceiling (Container : Set; Key : Key_Type) return Cursor is
Node : constant Node_Access :=
Key_Keys.Ceiling (Container.Tree, Key);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Ceiling;
--------------
-- Contains --
--------------
function Contains (Container : Set; Key : Key_Type) return Boolean is
begin
return Find (Container, Key) /= No_Element;
end Contains;
------------
-- Delete --
------------
procedure Delete (Container : in out Set; Key : Key_Type) is
Tree : Tree_Type renames Container.Tree;
Node : Node_Access := Key_Keys.Ceiling (Tree, Key);
Done : constant Node_Access := Key_Keys.Upper_Bound (Tree, Key);
X : Node_Access;
begin
if Node = Done then
raise Constraint_Error with "attempt to delete key not in set";
end if;
loop
X := Node;
Node := Tree_Operations.Next (Node);
Tree_Operations.Delete_Node_Sans_Free (Tree, X);
Free (X);
exit when Node = Done;
end loop;
end Delete;
-------------
-- Element --
-------------
function Element (Container : Set; Key : Key_Type) return Element_Type is
Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key);
begin
if Node = null then
raise Constraint_Error with "key not in set";
end if;
return Node.Element;
end Element;
---------------------
-- Equivalent_Keys --
---------------------
function Equivalent_Keys (Left, Right : Key_Type) return Boolean is
begin
if Left < Right
or else Right < Left
then
return False;
else
return True;
end if;
end Equivalent_Keys;
-------------
-- Exclude --
-------------
procedure Exclude (Container : in out Set; Key : Key_Type) is
Tree : Tree_Type renames Container.Tree;
Node : Node_Access := Key_Keys.Ceiling (Tree, Key);
Done : constant Node_Access := Key_Keys.Upper_Bound (Tree, Key);
X : Node_Access;
begin
while Node /= Done loop
X := Node;
Node := Tree_Operations.Next (Node);
Tree_Operations.Delete_Node_Sans_Free (Tree, X);
Free (X);
end loop;
end Exclude;
----------
-- Find --
----------
function Find (Container : Set; Key : Key_Type) return Cursor is
Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Find;
-----------
-- Floor --
-----------
function Floor (Container : Set; Key : Key_Type) return Cursor is
Node : constant Node_Access := Key_Keys.Floor (Container.Tree, Key);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Floor;
-------------------------
-- Is_Greater_Key_Node --
-------------------------
function Is_Greater_Key_Node
(Left : Key_Type;
Right : Node_Access) return Boolean is
begin
return Key (Right.Element) < Left;
end Is_Greater_Key_Node;
----------------------
-- Is_Less_Key_Node --
----------------------
function Is_Less_Key_Node
(Left : Key_Type;
Right : Node_Access) return Boolean is
begin
return Left < Key (Right.Element);
end Is_Less_Key_Node;
-------------
-- Iterate --
-------------
procedure Iterate
(Container : Set;
Key : Key_Type;
Process : not null access procedure (Position : Cursor))
is
procedure Process_Node (Node : Node_Access);
pragma Inline (Process_Node);
procedure Local_Iterate is
new Key_Keys.Generic_Iteration (Process_Node);
------------------
-- Process_Node --
------------------
procedure Process_Node (Node : Node_Access) is
begin
Process (Cursor'(Container'Unrestricted_Access, Node));
end Process_Node;
T : Tree_Type renames Container.Tree'Unrestricted_Access.all;
Busy : With_Busy (T.TC'Unrestricted_Access);
-- Start of processing for Iterate
begin
Local_Iterate (T, Key);
end Iterate;
---------
-- Key --
---------
function Key (Position : Cursor) return Key_Type is
begin
if Position.Node = null then
raise Constraint_Error with
"Position cursor equals No_Element";
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Key");
return Key (Position.Node.Element);
end Key;
---------------------
-- Reverse_Iterate --
---------------------
procedure Reverse_Iterate
(Container : Set;
Key : Key_Type;
Process : not null access procedure (Position : Cursor))
is
procedure Process_Node (Node : Node_Access);
pragma Inline (Process_Node);
procedure Local_Reverse_Iterate is
new Key_Keys.Generic_Reverse_Iteration (Process_Node);
------------------
-- Process_Node --
------------------
procedure Process_Node (Node : Node_Access) is
begin
Process (Cursor'(Container'Unrestricted_Access, Node));
end Process_Node;
T : Tree_Type renames Container.Tree'Unrestricted_Access.all;
Busy : With_Busy (T.TC'Unrestricted_Access);
-- Start of processing for Reverse_Iterate
begin
Local_Reverse_Iterate (T, Key);
end Reverse_Iterate;
--------------------
-- Update_Element --
--------------------
procedure Update_Element
(Container : in out Set;
Position : Cursor;
Process : not null access procedure (Element : in out Element_Type))
is
Tree : Tree_Type renames Container.Tree;
Node : constant Node_Access := Position.Node;
begin
if Node = null then
raise Constraint_Error with
"Position cursor equals No_Element";
end if;
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with
"Position cursor designates wrong set";
end if;
pragma Assert (Vet (Tree, Node),
"bad cursor in Update_Element");
declare
E : Element_Type renames Node.Element;
K : constant Key_Type := Key (E);
Lock : With_Lock (Tree.TC'Unrestricted_Access);
begin
Process (E);
if Equivalent_Keys (Left => K, Right => Key (E)) then
return;
end if;
end;
-- Delete_Node checks busy-bit
Tree_Operations.Delete_Node_Sans_Free (Tree, Node);
Insert_New_Item : declare
function New_Node return Node_Access;
pragma Inline (New_Node);
procedure Insert_Post is
new Element_Keys.Generic_Insert_Post (New_Node);
procedure Unconditional_Insert is
new Element_Keys.Generic_Unconditional_Insert (Insert_Post);
--------------
-- New_Node --
--------------
function New_Node return Node_Access is
begin
Node.Color := Red_Black_Trees.Red;
Node.Parent := null;
Node.Left := null;
Node.Right := null;
return Node;
end New_Node;
Result : Node_Access;
-- Start of processing for Insert_New_Item
begin
Unconditional_Insert
(Tree => Tree,
Key => Node.Element,
Node => Result);
pragma Assert (Result = Node);
end Insert_New_Item;
end Update_Element;
end Generic_Keys;
-----------------
-- Has_Element --
-----------------
function Has_Element (Position : Cursor) return Boolean is
begin
return Position /= No_Element;
end Has_Element;
------------
-- Insert --
------------
procedure Insert (Container : in out Set; New_Item : Element_Type) is
Position : Cursor;
pragma Unreferenced (Position);
begin
Insert (Container, New_Item, Position);
end Insert;
procedure Insert
(Container : in out Set;
New_Item : Element_Type;
Position : out Cursor)
is
begin
Insert_Sans_Hint (Container.Tree, New_Item, Position.Node);
Position.Container := Container'Unrestricted_Access;
end Insert;
----------------------
-- Insert_Sans_Hint --
----------------------
procedure Insert_Sans_Hint
(Tree : in out Tree_Type;
New_Item : Element_Type;
Node : out Node_Access)
is
function New_Node return Node_Access;
pragma Inline (New_Node);
procedure Insert_Post is
new Element_Keys.Generic_Insert_Post (New_Node);
procedure Unconditional_Insert is
new Element_Keys.Generic_Unconditional_Insert (Insert_Post);
--------------
-- New_Node --
--------------
function New_Node return Node_Access is
Node : constant Node_Access :=
new Node_Type'(Parent => null,
Left => null,
Right => null,
Color => Red_Black_Trees.Red,
Element => New_Item);
begin
return Node;
end New_Node;
-- Start of processing for Insert_Sans_Hint
begin
Unconditional_Insert (Tree, New_Item, Node);
end Insert_Sans_Hint;
----------------------
-- Insert_With_Hint --
----------------------
procedure Insert_With_Hint
(Dst_Tree : in out Tree_Type;
Dst_Hint : Node_Access;
Src_Node : Node_Access;
Dst_Node : out Node_Access)
is
function New_Node return Node_Access;
pragma Inline (New_Node);
procedure Insert_Post is
new Element_Keys.Generic_Insert_Post (New_Node);
procedure Insert_Sans_Hint is
new Element_Keys.Generic_Unconditional_Insert (Insert_Post);
procedure Local_Insert_With_Hint is
new Element_Keys.Generic_Unconditional_Insert_With_Hint
(Insert_Post,
Insert_Sans_Hint);
--------------
-- New_Node --
--------------
function New_Node return Node_Access is
Node : constant Node_Access :=
new Node_Type'(Parent => null,
Left => null,
Right => null,
Color => Red,
Element => Src_Node.Element);
begin
return Node;
end New_Node;
-- Start of processing for Insert_With_Hint
begin
Local_Insert_With_Hint
(Dst_Tree,
Dst_Hint,
Src_Node.Element,
Dst_Node);
end Insert_With_Hint;
------------------
-- Intersection --
------------------
procedure Intersection (Target : in out Set; Source : Set) is
begin
Set_Ops.Intersection (Target.Tree, Source.Tree);
end Intersection;
function Intersection (Left, Right : Set) return Set is
Tree : constant Tree_Type :=
Set_Ops.Intersection (Left.Tree, Right.Tree);
begin
return Set'(Controlled with Tree);
end Intersection;
--------------
-- Is_Empty --
--------------
function Is_Empty (Container : Set) return Boolean is
begin
return Container.Tree.Length = 0;
end Is_Empty;
------------------------
-- Is_Equal_Node_Node --
------------------------
function Is_Equal_Node_Node (L, R : Node_Access) return Boolean is
begin
return L.Element = R.Element;
end Is_Equal_Node_Node;
-----------------------------
-- Is_Greater_Element_Node --
-----------------------------
function Is_Greater_Element_Node
(Left : Element_Type;
Right : Node_Access) return Boolean
is
begin
-- e > node same as node < e
return Right.Element < Left;
end Is_Greater_Element_Node;
--------------------------
-- Is_Less_Element_Node --
--------------------------
function Is_Less_Element_Node
(Left : Element_Type;
Right : Node_Access) return Boolean
is
begin
return Left < Right.Element;
end Is_Less_Element_Node;
-----------------------
-- Is_Less_Node_Node --
-----------------------
function Is_Less_Node_Node (L, R : Node_Access) return Boolean is
begin
return L.Element < R.Element;
end Is_Less_Node_Node;
---------------
-- Is_Subset --
---------------
function Is_Subset (Subset : Set; Of_Set : Set) return Boolean is
begin
return Set_Ops.Is_Subset (Subset => Subset.Tree, Of_Set => Of_Set.Tree);
end Is_Subset;
-------------
-- Iterate --
-------------
procedure Iterate
(Container : Set;
Process : not null access procedure (Position : Cursor))
is
procedure Process_Node (Node : Node_Access);
pragma Inline (Process_Node);
procedure Local_Iterate is
new Tree_Operations.Generic_Iteration (Process_Node);
------------------
-- Process_Node --
------------------
procedure Process_Node (Node : Node_Access) is
begin
Process (Cursor'(Container'Unrestricted_Access, Node));
end Process_Node;
T : Tree_Type renames Container.Tree'Unrestricted_Access.all;
Busy : With_Busy (T.TC'Unrestricted_Access);
-- Start of processing for Iterate
begin
Local_Iterate (T);
end Iterate;
procedure Iterate
(Container : Set;
Item : Element_Type;
Process : not null access procedure (Position : Cursor))
is
procedure Process_Node (Node : Node_Access);
pragma Inline (Process_Node);
procedure Local_Iterate is
new Element_Keys.Generic_Iteration (Process_Node);
------------------
-- Process_Node --
------------------
procedure Process_Node (Node : Node_Access) is
begin
Process (Cursor'(Container'Unrestricted_Access, Node));
end Process_Node;
T : Tree_Type renames Container.Tree'Unrestricted_Access.all;
Busy : With_Busy (T.TC'Unrestricted_Access);
-- Start of processing for Iterate
begin
Local_Iterate (T, Item);
end Iterate;
function Iterate (Container : Set)
return Set_Iterator_Interfaces.Reversible_Iterator'Class
is
S : constant Set_Access := Container'Unrestricted_Access;
begin
-- The value of the Node component influences the behavior of the First
-- and Last selector functions of the iterator object. When the Node
-- component is null (as is the case here), this means the iterator
-- object was constructed without a start expression. This is a complete
-- iterator, meaning that the iteration starts from the (logical)
-- beginning of the sequence of items.
-- Note: For a forward iterator, Container.First is the beginning, and
-- for a reverse iterator, Container.Last is the beginning.
return It : constant Iterator := (Limited_Controlled with S, null) do
Busy (S.Tree.TC);
end return;
end Iterate;
function Iterate (Container : Set; Start : Cursor)
return Set_Iterator_Interfaces.Reversible_Iterator'Class
is
S : constant Set_Access := Container'Unrestricted_Access;
begin
-- It was formerly the case that when Start = No_Element, the partial
-- iterator was defined to behave the same as for a complete iterator,
-- and iterate over the entire sequence of items. However, those
-- semantics were unintuitive and arguably error-prone (it is too easy
-- to accidentally create an endless loop), and so they were changed,
-- per the ARG meeting in Denver on 2011/11. However, there was no
-- consensus about what positive meaning this corner case should have,
-- and so it was decided to simply raise an exception. This does imply,
-- however, that it is not possible to use a partial iterator to specify
-- an empty sequence of items.
if Start = No_Element then
raise Constraint_Error with
"Start position for iterator equals No_Element";
end if;
if Start.Container /= Container'Unrestricted_Access then
raise Program_Error with
"Start cursor of Iterate designates wrong set";
end if;
pragma Assert (Vet (Container.Tree, Start.Node),
"Start cursor of Iterate is bad");
-- The value of the Node component influences the behavior of the First
-- and Last selector functions of the iterator object. When the Node
-- component is non-null (as is the case here), it means that this is a
-- partial iteration, over a subset of the complete sequence of
-- items. The iterator object was constructed with a start expression,
-- indicating the position from which the iteration begins. Note that
-- the start position has the same value irrespective of whether this is
-- a forward or reverse iteration.
return It : constant Iterator :=
(Limited_Controlled with S, Start.Node)
do
Busy (S.Tree.TC);
end return;
end Iterate;
----------
-- Last --
----------
function Last (Container : Set) return Cursor is
begin
if Container.Tree.Last = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Container.Tree.Last);
end Last;
function Last (Object : Iterator) return Cursor is
begin
-- The value of the iterator object's Node component influences the
-- behavior of the Last (and First) selector function.
-- When the Node component is null, this means the iterator object was
-- constructed without a start expression, in which case the (reverse)
-- iteration starts from the (logical) beginning of the entire sequence
-- (corresponding to Container.Last, for a reverse iterator).
-- Otherwise, this is iteration over a partial sequence of items. When
-- the Node component is non-null, the iterator object was constructed
-- with a start expression, that specifies the position from which the
-- (reverse) partial iteration begins.
if Object.Node = null then
return Object.Container.Last;
else
return Cursor'(Object.Container, Object.Node);
end if;
end Last;
------------------
-- Last_Element --
------------------
function Last_Element (Container : Set) return Element_Type is
begin
if Container.Tree.Last = null then
raise Constraint_Error with "set is empty";
end if;
return Container.Tree.Last.Element;
end Last_Element;
----------
-- Left --
----------
function Left (Node : Node_Access) return Node_Access is
begin
return Node.Left;
end Left;
------------
-- Length --
------------
function Length (Container : Set) return Count_Type is
begin
return Container.Tree.Length;
end Length;
----------
-- Move --
----------
procedure Move is
new Tree_Operations.Generic_Move (Clear);
procedure Move (Target : in out Set; Source : in out Set) is
begin
Move (Target => Target.Tree, Source => Source.Tree);
end Move;
----------
-- Next --
----------
procedure Next (Position : in out Cursor)
is
begin
Position := Next (Position);
end Next;
function Next (Position : Cursor) return Cursor is
begin
if Position = No_Element then
return No_Element;
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Next");
declare
Node : constant Node_Access := Tree_Operations.Next (Position.Node);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Position.Container, Node);
end;
end Next;
function Next (Object : Iterator; Position : Cursor) return Cursor is
begin
if Position.Container = null then
return No_Element;
end if;
if Position.Container /= Object.Container then
raise Program_Error with
"Position cursor of Next designates wrong set";
end if;
return Next (Position);
end Next;
-------------
-- Overlap --
-------------
function Overlap (Left, Right : Set) return Boolean is
begin
return Set_Ops.Overlap (Left.Tree, Right.Tree);
end Overlap;
------------
-- Parent --
------------
function Parent (Node : Node_Access) return Node_Access is
begin
return Node.Parent;
end Parent;
--------------
-- Previous --
--------------
procedure Previous (Position : in out Cursor)
is
begin
Position := Previous (Position);
end Previous;
function Previous (Position : Cursor) return Cursor is
begin
if Position = No_Element then
return No_Element;
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Previous");
declare
Node : constant Node_Access :=
Tree_Operations.Previous (Position.Node);
begin
return (if Node = null then No_Element
else Cursor'(Position.Container, Node));
end;
end Previous;
function Previous (Object : Iterator; Position : Cursor) return Cursor is
begin
if Position.Container = null then
return No_Element;
end if;
if Position.Container /= Object.Container then
raise Program_Error with
"Position cursor of Previous designates wrong set";
end if;
return Previous (Position);
end Previous;
-------------------
-- Query_Element --
-------------------
procedure Query_Element
(Position : Cursor;
Process : not null access procedure (Element : Element_Type))
is
begin
if Position.Node = null then
raise Constraint_Error with "Position cursor equals No_Element";
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Query_Element");
declare
T : Tree_Type renames Position.Container.Tree;
Lock : With_Lock (T.TC'Unrestricted_Access);
begin
Process (Position.Node.Element);
end;
end Query_Element;
----------
-- Read --
----------
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Container : out Set)
is
function Read_Node
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
pragma Inline (Read_Node);
procedure Read is
new Tree_Operations.Generic_Read (Clear, Read_Node);
---------------
-- Read_Node --
---------------
function Read_Node
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
begin
Element_Type'Read (Stream, Node.Element);
return Node;
exception
when others =>
Free (Node); -- Note that Free deallocates elem too
raise;
end Read_Node;
-- Start of processing for Read
begin
Read (Stream, Container.Tree);
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
raise Program_Error with "attempt to stream set cursor";
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Constant_Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Read;
---------------------
-- Replace_Element --
---------------------
procedure Replace_Element
(Tree : in out Tree_Type;
Node : Node_Access;
Item : Element_Type)
is
begin
if Item < Node.Element
or else Node.Element < Item
then
null;
else
TE_Check (Tree.TC);
Node.Element := Item;
return;
end if;
Tree_Operations.Delete_Node_Sans_Free (Tree, Node); -- Checks busy-bit
Insert_New_Item : declare
function New_Node return Node_Access;
pragma Inline (New_Node);
procedure Insert_Post is
new Element_Keys.Generic_Insert_Post (New_Node);
procedure Unconditional_Insert is
new Element_Keys.Generic_Unconditional_Insert (Insert_Post);
--------------
-- New_Node --
--------------
function New_Node return Node_Access is
begin
Node.Element := Item;
Node.Color := Red_Black_Trees.Red;
Node.Parent := null;
Node.Left := null;
Node.Right := null;
return Node;
end New_Node;
Result : Node_Access;
-- Start of processing for Insert_New_Item
begin
Unconditional_Insert
(Tree => Tree,
Key => Item,
Node => Result);
pragma Assert (Result = Node);
end Insert_New_Item;
end Replace_Element;
procedure Replace_Element
(Container : in out Set;
Position : Cursor;
New_Item : Element_Type)
is
begin
if Position.Node = null then
raise Constraint_Error with
"Position cursor equals No_Element";
end if;
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with
"Position cursor designates wrong set";
end if;
pragma Assert (Vet (Container.Tree, Position.Node),
"bad cursor in Replace_Element");
Replace_Element (Container.Tree, Position.Node, New_Item);
end Replace_Element;
---------------------
-- Reverse_Iterate --
---------------------
procedure Reverse_Iterate
(Container : Set;
Process : not null access procedure (Position : Cursor))
is
procedure Process_Node (Node : Node_Access);
pragma Inline (Process_Node);
procedure Local_Reverse_Iterate is
new Tree_Operations.Generic_Reverse_Iteration (Process_Node);
------------------
-- Process_Node --
------------------
procedure Process_Node (Node : Node_Access) is
begin
Process (Cursor'(Container'Unrestricted_Access, Node));
end Process_Node;
T : Tree_Type renames Container.Tree'Unrestricted_Access.all;
Busy : With_Busy (T.TC'Unrestricted_Access);
-- Start of processing for Reverse_Iterate
begin
Local_Reverse_Iterate (T);
end Reverse_Iterate;
procedure Reverse_Iterate
(Container : Set;
Item : Element_Type;
Process : not null access procedure (Position : Cursor))
is
procedure Process_Node (Node : Node_Access);
pragma Inline (Process_Node);
procedure Local_Reverse_Iterate is
new Element_Keys.Generic_Reverse_Iteration (Process_Node);
------------------
-- Process_Node --
------------------
procedure Process_Node (Node : Node_Access) is
begin
Process (Cursor'(Container'Unrestricted_Access, Node));
end Process_Node;
T : Tree_Type renames Container.Tree'Unrestricted_Access.all;
Busy : With_Busy (T.TC'Unrestricted_Access);
-- Start of processing for Reverse_Iterate
begin
Local_Reverse_Iterate (T, Item);
end Reverse_Iterate;
-----------
-- Right --
-----------
function Right (Node : Node_Access) return Node_Access is
begin
return Node.Right;
end Right;
---------------
-- Set_Color --
---------------
procedure Set_Color (Node : Node_Access; Color : Color_Type) is
begin
Node.Color := Color;
end Set_Color;
--------------
-- Set_Left --
--------------
procedure Set_Left (Node : Node_Access; Left : Node_Access) is
begin
Node.Left := Left;
end Set_Left;
----------------
-- Set_Parent --
----------------
procedure Set_Parent (Node : Node_Access; Parent : Node_Access) is
begin
Node.Parent := Parent;
end Set_Parent;
---------------
-- Set_Right --
---------------
procedure Set_Right (Node : Node_Access; Right : Node_Access) is
begin
Node.Right := Right;
end Set_Right;
--------------------------
-- Symmetric_Difference --
--------------------------
procedure Symmetric_Difference (Target : in out Set; Source : Set) is
begin
Set_Ops.Symmetric_Difference (Target.Tree, Source.Tree);
end Symmetric_Difference;
function Symmetric_Difference (Left, Right : Set) return Set is
Tree : constant Tree_Type :=
Set_Ops.Symmetric_Difference (Left.Tree, Right.Tree);
begin
return Set'(Controlled with Tree);
end Symmetric_Difference;
------------
-- To_Set --
------------
function To_Set (New_Item : Element_Type) return Set is
Tree : Tree_Type;
Node : Node_Access;
pragma Unreferenced (Node);
begin
Insert_Sans_Hint (Tree, New_Item, Node);
return Set'(Controlled with Tree);
end To_Set;
-----------
-- Union --
-----------
procedure Union (Target : in out Set; Source : Set) is
begin
Set_Ops.Union (Target.Tree, Source.Tree);
end Union;
function Union (Left, Right : Set) return Set is
Tree : constant Tree_Type := Set_Ops.Union (Left.Tree, Right.Tree);
begin
return Set'(Controlled with Tree);
end Union;
-----------
-- Write --
-----------
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Container : Set)
is
procedure Write_Node
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
procedure Write is
new Tree_Operations.Generic_Write (Write_Node);
----------------
-- Write_Node --
----------------
procedure Write_Node
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin
Element_Type'Write (Stream, Node.Element);
end Write_Node;
-- Start of processing for Write
begin
Write (Stream, Container.Tree);
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin
raise Program_Error with "attempt to stream set cursor";
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Constant_Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Write;
end Ada.Containers.Ordered_Multisets;
|
-- The Village of Vampire by YT, このソースコードはNYSLです
with Ada.Strings.Unbounded;
procedure Vampire.R3.User_Page (
Output : not null access Ada.Streams.Root_Stream_Type'Class;
Form : in Forms.Root_Form_Type'Class;
Template : in String;
Summaries : in Tabula.Villages.Lists.Summary_Maps.Map;
User_Id : in String;
User_Password : in String;
User_Info : in Users.User_Info)
is
use type Ada.Strings.Unbounded.Unbounded_String;
use type Tabula.Villages.Village_State;
-- ユーザーの参加状況
Joined : aliased Ada.Strings.Unbounded.Unbounded_String;
Created : aliased Ada.Strings.Unbounded.Unbounded_String;
begin
for I in Summaries.Iterate loop
declare
V : Tabula.Villages.Lists.Village_Summary
renames Summaries.Constant_Reference (I);
begin
if V.State < Tabula.Villages.Epilogue then
for J in V.People.Iterate loop
if V.People.Constant_Reference (J) = User_Id then
if not Joined.Is_Null then
Ada.Strings.Unbounded.Append(Joined, "、");
end if;
Ada.Strings.Unbounded.Append(Joined, V.Name);
end if;
end loop;
if V.By = User_Id then
Created := V.Name;
end if;
end if;
end;
end loop;
declare
procedure Handle (
Output : not null access Ada.Streams.Root_Stream_Type'Class;
Tag : in String;
Contents : in Web.Producers.Template) is
begin
if Tag = "action_page" then
Forms.Write_Attribute_Name (Output, "action");
Forms.Write_Link (
Output,
Form,
Current_Directory => ".",
Resource => Forms.Self,
Parameters =>
Form.Parameters_To_User_Page (
User_Id => User_Id,
User_Password => User_Password));
elsif Tag = "userpanel" then
Handle_User_Panel (
Output,
Contents,
Form,
User_Id => User_Id,
User_Password => User_Password);
elsif Tag = "id" then
Forms.Write_In_HTML (Output, Form, User_Id);
elsif Tag = "joined" then
if not Joined.Is_Null then
declare
procedure Handle (
Output : not null access Ada.Streams.Root_Stream_Type'Class;
Tag : in String;
Contents : in Web.Producers.Template) is
begin
if Tag = "activevillage" then
Forms.Write_In_HTML (Output, Form, Joined.Constant_Reference);
else
Raise_Unknown_Tag (Tag);
end if;
end Handle;
begin
Web.Producers.Produce(Output, Contents, Handler => Handle'Access);
end;
end if;
elsif Tag = "nojoined" then
if Joined.Is_Null then
Web.Producers.Produce(Output, Contents);
end if;
elsif Tag = "created" then
if not Created.Is_Null then
declare
procedure Handle (
Output : not null access Ada.Streams.Root_Stream_Type'Class;
Tag : in String;
Contents : in Web.Producers.Template) is
begin
if Tag = "createdvillage" then
Forms.Write_In_HTML (Output, Form, Created.Constant_Reference);
else
Raise_Unknown_Tag (Tag);
end if;
end Handle;
begin
Web.Producers.Produce(Output, Contents, Handler => Handle'Access);
end;
end if;
elsif Tag = "creatable" then
if Joined.Is_Null and then Created.Is_Null then
Web.Producers.Produce(Output, Contents, Handler => Handle'Access); -- rec
end if;
elsif Tag = "href_index" then
Forms.Write_Attribute_Name (Output, "href");
Forms.Write_Link (
Output,
Form,
Current_Directory => ".",
Resource => Forms.Self,
Parameters =>
Form.Parameters_To_Index_Page (
User_Id => User_Id,
User_Password => User_Password));
else
Raise_Unknown_Tag (Tag);
end if;
end Handle;
begin
Web.Producers.Produce (Output, Read (Template), Handler => Handle'Access);
end;
end Vampire.R3.User_Page;
|
------------------------------------------------------------------------------
-- --
-- Internet Protocol Suite Package --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * Ensi Martini (ANNEXI-STRAYLINE) --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- --
-- * Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with Interfaces.C;
with Interfaces.C.Strings;
with Ada.Strings.Maps;
with INET.Internal.OS_Constants; use INET.Internal.OS_Constants;
package body INET.IP is
-------------------------
-- From_String_Address --
-------------------------
function From_String_Address (Address: String) return IP_Address is
use Interfaces.C;
use Ada.Strings.Maps;
function inet4_pton (af : in int := AF_INET;
src : in char_array;
dst : out IPv4_Address)
return int
with
Convention => C,
Import => True,
External_Name => "inet_pton";
function inet6_pton (af : in int := AF_INET6;
src : in char_array;
dst : out IPv6_Address)
return int
with
Convention => C,
Import => True,
External_Name => "inet_pton";
Legal_Decimal : Character_Set := To_Set ("0123456789");
Legal_Hex : Character_Set := Legal_Decimal or To_Set ("abcdefABCDEF");
Legal_IPv4 : Character_Set := Legal_Decimal or To_Set (".");
Legal_IPv6 : Character_Set := Legal_Hex or To_Set (":");
-- Legal_Characters : Character_Set := To_Set ("0123456789abcdefABCDEF:.");
-- Legal_IPv46 : Character_Set := Legal_IPv4 and Legal_IPv6;
Retval : int;
IPv4_Valid : Boolean := True;
IPv6_Valid : Boolean := True;
pragma Assertion_Policy (Check);
begin
-- We first check the legality of the address provided
for C of Address loop
IPv4_Valid := IPv4_Valid and Is_In(Element => C,
Set => Legal_IPv4);
IPv6_Valid := IPv6_Valid and Is_In(Element => C,
Set => Legal_IPv6);
exit when not (IPv4_Valid or IPv6_Valid);
end loop;
-- It will never be the case that an address fulfills requirements for
-- both IPv4 and IPv6, so we can directly check each individually
if IPv4_Valid then
return A: IP_Address (Version => IPv4) do
Retval := inet4_pton (src => To_C (Address),
dst => A.v4_Address);
if Retval /= 1 then
raise Invalid_Address;
end if;
end return;
elsif IPv6_Valid then
return A: IP_Address (Version => IPv6) do
Retval := inet6_pton (src => To_C (Address),
dst => A.v6_Address);
if Retval /= 1 then
raise Invalid_Address;
end if;
end return;
else
raise Invalid_Address;
end if;
end From_String_Address;
-----------------------
-- To_String_Address --
-----------------------
function To_String_Address (Address: IP_Address) return String is
use Interfaces.C;
use Interfaces.C.Strings;
-- Address is in network byte order
function inet4_ntop (af : in int := AF_INET;
src : in IPv4_Address;
dst : out Interfaces.C.Char_Array;
size : in socklen_t)
return Interfaces.C.Strings.chars_ptr
with
Convention => C,
Import => True,
External_Name => "inet_ntop";
function inet6_ntop (af : in int := AF_INET6;
src : in IPv6_Address;
dst : out Interfaces.C.Char_Array;
size : in socklen_t)
return Interfaces.C.Strings.chars_ptr
with
Convention => C,
Import => True,
External_Name => "inet_ntop";
-- Output_IPv* is the buffer to which the dst out address will be written
-- Output_IPv* contains one additional position for the null terminator
-- The longest possible IPv4 will be 16 bytes long
-- The longest possible IPv6 will be 46 bytes long
-- Since we are only returning one string, we can just take the longest
-- possible array size and use that for the output
Retval: Interfaces.C.Strings.chars_ptr;
Address_Buffer: Interfaces.C.Char_Array(1 .. 40);
-- Based on the longest-possible IPv6 address, which is eight groups
-- of four hex digits (32), separated by colons (7), with room for a null
-- terminator = 32 + 7 + 1 = 40
begin
case Address.Version is
when IPv4 =>
Retval := inet4_ntop(src => Address.v4_Address,
dst => Address_Buffer,
size => Address_Buffer'Length);
when IPv6 =>
Retval := inet6_ntop(src => Address.v6_Address,
dst => Address_Buffer,
size => Address_Buffer'Length);
end case;
if Retval = Interfaces.C.Strings.Null_Ptr then
raise Invalid_Address;
else
return To_Ada (Address_Buffer);
end if;
end To_String_Address;
end INET.IP;
|
-----------------------------------------------------------------------
-- gen-model-beans -- Ada Bean declarations
-- Copyright (C) 2012, 2013 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Gen.Model.Mappings;
package body Gen.Model.Beans is
-- ------------------------------
-- Get the value identified by the name.
-- If the name cannot be found, the method should return the Null object.
-- ------------------------------
overriding
function Get_Value (From : in Bean_Definition;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "members" or Name = "columns" then
return From.Members_Bean;
elsif Name = "type" then
return Util.Beans.Objects.To_Object (From.Type_Name);
elsif Name = "isBean" then
return Util.Beans.Objects.To_Object (True);
else
return Tables.Table_Definition (From).Get_Value (Name);
end if;
end Get_Value;
-- ------------------------------
-- Create an attribute with the given name and add it to the bean.
-- ------------------------------
procedure Add_Attribute (Bean : in out Bean_Definition;
Name : in Unbounded_String;
Column : out Gen.Model.Tables.Column_Definition_Access) is
begin
Column := new Gen.Model.Tables.Column_Definition;
Column.Name := Name;
Column.Sql_Name := Name;
Column.Number := Bean.Members.Get_Count;
Column.Table := Bean'Unchecked_Access;
Bean.Members.Append (Column);
end Add_Attribute;
-- ------------------------------
-- Create a table with the given name.
-- ------------------------------
function Create_Bean (Name : in Unbounded_String) return Bean_Definition_Access is
Bean : constant Bean_Definition_Access := new Bean_Definition;
begin
Bean.Kind := Mappings.T_BEAN;
Bean.Name := Name;
declare
Pos : constant Natural := Index (Bean.Name, ".", Ada.Strings.Backward);
begin
if Pos > 0 then
Bean.Pkg_Name := Unbounded_Slice (Bean.Name, 1, Pos - 1);
Bean.Type_Name := Unbounded_Slice (Bean.Name, Pos + 1, Length (Bean.Name));
else
Bean.Pkg_Name := To_Unbounded_String ("ADO");
Bean.Type_Name := Bean.Name;
end if;
end;
return Bean;
end Create_Bean;
end Gen.Model.Beans;
|
-- This package is intended to set up and tear down the test environment.
-- Once created by GNATtest, this package will never be overwritten
-- automatically. Contents of this package can be modified in any way
-- except for sections surrounded by a 'read only' marker.
with AUnit.Test_Fixtures;
package Factions.Test_Data is
-- begin read only
type Test is new AUnit.Test_Fixtures.Test_Fixture
-- end read only
with null record;
procedure Set_Up(Gnattest_T: in out Test);
procedure Tear_Down(Gnattest_T: in out Test);
end Factions.Test_Data;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . O R D E R E D _ M A P S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-2019, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with Ada.Iterator_Interfaces;
private with Ada.Containers.Red_Black_Trees;
private with Ada.Finalization;
private with Ada.Streams;
generic
type Key_Type is private;
type Element_Type is private;
with function "<" (Left, Right : Key_Type) return Boolean is <>;
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Ordered_Maps is
pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
function Equivalent_Keys (Left, Right : Key_Type) return Boolean;
type Map is tagged private with
Constant_Indexing => Constant_Reference,
Variable_Indexing => Reference,
Default_Iterator => Iterate,
Iterator_Element => Element_Type;
type Cursor is private;
pragma Preelaborable_Initialization (Cursor);
Empty_Map : constant Map;
No_Element : constant Cursor;
function Has_Element (Position : Cursor) return Boolean;
package Map_Iterator_Interfaces is new
Ada.Iterator_Interfaces (Cursor, Has_Element);
function "=" (Left, Right : Map) return Boolean;
function Length (Container : Map) return Count_Type;
function Is_Empty (Container : Map) return Boolean;
procedure Clear (Container : in out Map);
function Key (Position : Cursor) return Key_Type;
function Element (Position : Cursor) return Element_Type;
procedure Replace_Element
(Container : in out Map;
Position : Cursor;
New_Item : Element_Type);
procedure Query_Element
(Position : Cursor;
Process : not null access
procedure (Key : Key_Type; Element : Element_Type));
procedure Update_Element
(Container : in out Map;
Position : Cursor;
Process : not null access
procedure (Key : Key_Type; Element : in out Element_Type));
type Constant_Reference_Type
(Element : not null access constant Element_Type) is private
with
Implicit_Dereference => Element;
type Reference_Type (Element : not null access Element_Type) is private
with
Implicit_Dereference => Element;
function Constant_Reference
(Container : aliased Map;
Position : Cursor) return Constant_Reference_Type;
pragma Inline (Constant_Reference);
function Reference
(Container : aliased in out Map;
Position : Cursor) return Reference_Type;
pragma Inline (Reference);
function Constant_Reference
(Container : aliased Map;
Key : Key_Type) return Constant_Reference_Type;
pragma Inline (Constant_Reference);
function Reference
(Container : aliased in out Map;
Key : Key_Type) return Reference_Type;
pragma Inline (Reference);
procedure Assign (Target : in out Map; Source : Map);
function Copy (Source : Map) return Map;
procedure Move (Target : in out Map; Source : in out Map);
procedure Insert
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type;
Position : out Cursor;
Inserted : out Boolean);
procedure Insert
(Container : in out Map;
Key : Key_Type;
Position : out Cursor;
Inserted : out Boolean);
procedure Insert
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type);
procedure Include
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type);
procedure Replace
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type);
procedure Exclude (Container : in out Map; Key : Key_Type);
procedure Delete (Container : in out Map; Key : Key_Type);
procedure Delete (Container : in out Map; Position : in out Cursor);
procedure Delete_First (Container : in out Map);
procedure Delete_Last (Container : in out Map);
function First (Container : Map) return Cursor;
function First_Element (Container : Map) return Element_Type;
function First_Key (Container : Map) return Key_Type;
function Last (Container : Map) return Cursor;
function Last_Element (Container : Map) return Element_Type;
function Last_Key (Container : Map) return Key_Type;
function Next (Position : Cursor) return Cursor;
procedure Next (Position : in out Cursor);
function Previous (Position : Cursor) return Cursor;
procedure Previous (Position : in out Cursor);
function Find (Container : Map; Key : Key_Type) return Cursor;
function Element (Container : Map; Key : Key_Type) return Element_Type;
function Floor (Container : Map; Key : Key_Type) return Cursor;
function Ceiling (Container : Map; Key : Key_Type) return Cursor;
function Contains (Container : Map; Key : Key_Type) return Boolean;
function "<" (Left, Right : Cursor) return Boolean;
function ">" (Left, Right : Cursor) return Boolean;
function "<" (Left : Cursor; Right : Key_Type) return Boolean;
function ">" (Left : Cursor; Right : Key_Type) return Boolean;
function "<" (Left : Key_Type; Right : Cursor) return Boolean;
function ">" (Left : Key_Type; Right : Cursor) return Boolean;
procedure Iterate
(Container : Map;
Process : not null access procedure (Position : Cursor));
procedure Reverse_Iterate
(Container : Map;
Process : not null access procedure (Position : Cursor));
-- The map container supports iteration in both the forward and reverse
-- directions, hence these constructor functions return an object that
-- supports the Reversible_Iterator interface.
function Iterate
(Container : Map)
return Map_Iterator_Interfaces.Reversible_Iterator'class;
function Iterate
(Container : Map;
Start : Cursor)
return Map_Iterator_Interfaces.Reversible_Iterator'class;
private
pragma Inline (Next);
pragma Inline (Previous);
type Node_Type;
type Node_Access is access Node_Type;
type Node_Type is limited record
Parent : Node_Access;
Left : Node_Access;
Right : Node_Access;
Color : Red_Black_Trees.Color_Type := Red_Black_Trees.Red;
Key : Key_Type;
Element : aliased Element_Type;
end record;
package Tree_Types is
new Red_Black_Trees.Generic_Tree_Types (Node_Type, Node_Access);
type Map is new Ada.Finalization.Controlled with record
Tree : Tree_Types.Tree_Type;
end record;
overriding procedure Adjust (Container : in out Map);
overriding procedure Finalize (Container : in out Map) renames Clear;
use Red_Black_Trees;
use Tree_Types, Tree_Types.Implementation;
use Ada.Finalization;
use Ada.Streams;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Container : Map);
for Map'Write use Write;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Container : out Map);
for Map'Read use Read;
type Map_Access is access all Map;
for Map_Access'Storage_Size use 0;
type Cursor is record
Container : Map_Access;
Node : Node_Access;
end record;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
subtype Reference_Control_Type is Implementation.Reference_Control_Type;
-- It is necessary to rename this here, so that the compiler can find it
type Constant_Reference_Type
(Element : not null access constant Element_Type) is
record
Control : Reference_Control_Type :=
raise Program_Error with "uninitialized reference";
-- The RM says, "The default initialization of an object of
-- type Constant_Reference_Type or Reference_Type propagates
-- Program_Error."
end record;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Constant_Reference_Type);
for Constant_Reference_Type'Read use Read;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Constant_Reference_Type);
for Constant_Reference_Type'Write use Write;
type Reference_Type
(Element : not null access Element_Type) is
record
Control : Reference_Control_Type :=
raise Program_Error with "uninitialized reference";
-- The RM says, "The default initialization of an object of
-- type Constant_Reference_Type or Reference_Type propagates
-- Program_Error."
end record;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Reference_Type);
for Reference_Type'Read use Read;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Reference_Type);
for Reference_Type'Write use Write;
-- Three operations are used to optimize in the expansion of "for ... of"
-- loops: the Next(Cursor) procedure in the visible part, and the following
-- Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-- details.
function Pseudo_Reference
(Container : aliased Map'Class) return Reference_Control_Type;
pragma Inline (Pseudo_Reference);
-- Creates an object of type Reference_Control_Type pointing to the
-- container, and increments the Lock. Finalization of this object will
-- decrement the Lock.
type Element_Access is access all Element_Type with
Storage_Size => 0;
function Get_Element_Access
(Position : Cursor) return not null Element_Access;
-- Returns a pointer to the element designated by Position.
Empty_Map : constant Map := (Controlled with others => <>);
No_Element : constant Cursor := Cursor'(null, null);
type Iterator is new Limited_Controlled and
Map_Iterator_Interfaces.Reversible_Iterator with
record
Container : Map_Access;
Node : Node_Access;
end record
with Disable_Controlled => not T_Check;
overriding procedure Finalize (Object : in out Iterator);
overriding function First (Object : Iterator) return Cursor;
overriding function Last (Object : Iterator) return Cursor;
overriding function Next
(Object : Iterator;
Position : Cursor) return Cursor;
overriding function Previous
(Object : Iterator;
Position : Cursor) return Cursor;
end Ada.Containers.Ordered_Maps;
|
pragma License (GPL);
------------------------------------------------------------------------------
-- EMAIL: <darkestkhan@gmail.com> --
-- License: GNU GPLv3 or any later as published by Free Software Foundation --
-- (see COPYING file) --
-- --
-- Copyright © 2015 darkestkhan --
------------------------------------------------------------------------------
-- This Program is Free Software: You can redistribute it and/or modify --
-- it under the terms of The GNU General Public License as published by --
-- the Free Software Foundation, either version 3 of the license, or --
-- (at Your option) any later version. --
-- --
-- This Program is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS for A PARTICULAR PURPOSE. See the --
-- GNU General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public License --
-- along with this program. If not, see <http://www.gnu.org/licenses/>. --
------------------------------------------------------------------------------
with Ada.Command_Line;
with Ada.Text_IO;
with CBAP;
procedure CBAP_Variable_Detection is
---------------------------------------------------------------------------
Error_Count: Natural := 0;
---------------------------------------------------------------------------
procedure Case_Insensitive (Variable: in String)
is
begin
if Variable /= "TruE" then
Ada.Text_IO.Put_Line
( Ada.Text_IO.Standard_Error, "Failed at Case_Insensitive" );
Ada.Text_IO.Put_Line (Variable);
Error_Count := Error_Count + 1;
end if;
end Case_Insensitive;
---------------------------------------------------------------------------
procedure Case_Sensitive (Variable: in String)
is
begin
if Variable /= "true" then
Ada.Text_IO.Put_Line
( Ada.Text_IO.Standard_Error, "Failed at Case_Sensitive" );
Error_Count := Error_Count + 1;
end if;
end Case_Sensitive;
---------------------------------------------------------------------------
procedure Edge_Case (Variable: in String)
is
begin
if Variable /= "" then
Ada.Text_IO.Put_Line
( Ada.Text_IO.Standard_Error, "Failed at Edge_Case" );
Error_Count := Error_Count + 1;
end if;
end Edge_Case;
---------------------------------------------------------------------------
begin
CBAP.Register
( Case_Insensitive'Unrestricted_Access,
"insensitive",
CBAP.Variable,
Case_Sensitive => False
);
CBAP.Register
( Case_Sensitive'Unrestricted_Access, "SENSITIVE", CBAP.Variable );
CBAP.Register
( Edge_Case'Unrestricted_Access, "edge", CBAP.Variable );
CBAP.Process_Arguments;
if Error_Count /= 0 then
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
else
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Success);
end if;
end CBAP_Variable_Detection;
|
-- CE3905L.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT DATA_ERROR IS RAISED, BY GET, WHEN THE INPUT CONTAINS
--
-- 1. EMBEDDED BLANKS.
-- 2. SINGLY QUOTED CHARACTER LITERALS.
-- 3. IDENTIFIERS BEGINNING WITH NON LETTERS.
-- 4. IDENTIFIERS CONTAINING SPECIAL CHARACTERS.
-- 5. CONSECUTIVE UNDERSCORES.
-- 6. LEADING OR TRAILING UNDERSCORES.
-- APPLICABILITY CRITERIA:
-- THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH
-- SUPPORT TEXT FILES.
-- HISTORY:
-- VKG 02/14/83
-- SPS 03/16/83
-- CPP 07/30/84
-- TBN 11/10/86 REVISED TEST TO OUTPUT A NON_APPLICABLE
-- RESULT WHEN FILES ARE NOT SUPPORTED.
-- DWC 09/16/87 REMOVED UNNECESSARY CODE AND CORRECTED
-- EXCEPTION HANDLING.
WITH TEXT_IO; USE TEXT_IO;
WITH REPORT; USE REPORT;
PROCEDURE CE3905L IS
INCOMPLETE : EXCEPTION;
BEGIN
TEST ("CE3905L", "CHECK GET FOR ENUMERATION_IO " &
"WITH LEXICAL ERRORS");
DECLARE
FT : FILE_TYPE;
BEGIN
BEGIN
CREATE (FT, OUT_FILE, LEGAL_FILE_NAME);
EXCEPTION
WHEN USE_ERROR =>
NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
"WITH OUT_FILE MODE");
RAISE INCOMPLETE;
WHEN NAME_ERROR =>
NOT_APPLICABLE ("NAME_ERROR RAISED; TEXT CREATE " &
"WITH OUT_FILE MODE");
RAISE INCOMPLETE;
END;
PUT (FT, "RED ISH");
NEW_LINE (FT);
PUT (FT, "'A ");
NEW_LINE (FT);
PUT (FT, "2REDISH");
NEW_LINE (FT);
PUT (FT, "BLUE$%ISH");
NEW_LINE (FT);
PUT (FT, "RED__ISH");
NEW_LINE (FT);
PUT (FT, "_YELLOWISH");
NEW_LINE (FT);
PUT (FT, "GREENISH_");
NEW_LINE (FT);
CLOSE (FT);
DECLARE
TYPE COLOUR IS
( GREYISH,
REDISH ,
BLUEISH,
YELLOWISH,
GREENISH, 'A');
PACKAGE COLOUR_IO IS NEW ENUMERATION_IO(COLOUR);
USE COLOUR_IO;
X : COLOUR := GREYISH;
CH : CHARACTER;
BEGIN
BEGIN
OPEN (FT, IN_FILE, LEGAL_FILE_NAME);
EXCEPTION
WHEN USE_ERROR =>
NOT_APPLICABLE ("USE_ERROR RAISED; TEXT " &
"OPEN WITH IN_FILE MODE");
RAISE INCOMPLETE;
END;
BEGIN
GET (FT, X);
FAILED ("DATA_ERROR NOT RAISED - 1");
EXCEPTION
WHEN DATA_ERROR =>
IF X /= GREYISH THEN
FAILED ("ACTUAL PARAMETER TO GET " &
"AFFECTED ON DATA_ERROR - 1");
END IF;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 1");
END;
IF END_OF_LINE (FT) THEN
FAILED ("GET STOPPED AT END OF LINE - 1");
ELSE
GET (FT, CH);
IF CH /= ' ' THEN
FAILED ("GET STOPPED AT WRONG POSITION " &
"- 1: CHAR IS " & CH);
END IF;
END IF;
SKIP_LINE (FT);
BEGIN
GET (FT, X);
FAILED ("DATA_ERROR NOT RAISED - 2");
EXCEPTION
WHEN DATA_ERROR =>
IF X /= GREYISH THEN
FAILED ("ACTUAL PARAMETER TO GET " &
"AFFECTED ON DATA_ERROR - 2");
END IF;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 2");
END;
IF END_OF_LINE (FT) THEN
FAILED ("GET STOPPED AT END OF LINE - 2");
ELSE
GET (FT, CH);
IF CH /= ' ' THEN
FAILED ("GET STOPPED AT WRONG POSITION " &
"- 2: CHAR IS " & CH);
END IF;
END IF;
SKIP_LINE (FT);
BEGIN
GET (FT, X);
FAILED ("DATA_ERROR NOT RAISED - 3");
EXCEPTION
WHEN DATA_ERROR =>
IF X /= GREYISH THEN
FAILED ("ACTUAL PARAMETER TO GET " &
"AFFECTED ON DATA_ERROR - 3");
END IF;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 3");
END;
IF END_OF_LINE (FT) THEN
FAILED ("GET STOPPED AT END OF LINE - 3");
ELSE
GET (FT, CH);
IF CH /= '2' THEN
FAILED ("GET STOPPED AT WRONG POSITION " &
"- 3: CHAR IS " & CH);
END IF;
END IF;
SKIP_LINE (FT);
BEGIN
GET (FT, X);
FAILED ("DATA_ERROR NOT RAISED - 4");
EXCEPTION
WHEN DATA_ERROR =>
IF X /= GREYISH THEN
FAILED ("ACTUAL PARAMETER TO GET " &
"AFFECTED ON DATA_ERROR - 4");
END IF;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 4");
END;
IF END_OF_LINE (FT) THEN
FAILED ("GET STOPPED AT END OF LINE - 4");
ELSE
GET (FT, CH);
IF CH /= '$' THEN
FAILED ("GET STOPPED AT WRONG POSITION " &
"- 4: CHAR IS " & CH);
END IF;
END IF;
SKIP_LINE (FT);
BEGIN
GET (FT, X);
FAILED ("DATA_ERROR NOT RAISED - 5");
EXCEPTION
WHEN DATA_ERROR =>
IF X /= GREYISH THEN
FAILED ("ACTUAL PARAMETER TO GET " &
"AFFECTED ON DATA_ERROR - 5");
END IF;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 5");
END;
IF END_OF_LINE (FT) THEN
FAILED ("GET STOPPED AT END OF LINE - 5");
ELSE
GET (FT, CH);
IF CH /= '_' THEN
FAILED ("GET STOPPED AT WRONG POSITION " &
"- 5: CHAR IS " & CH);
ELSE
GET (FT, CH);
IF CH /= 'I' THEN
FAILED ("ERROR READING DATA - 5");
END IF;
END IF;
END IF;
SKIP_LINE (FT);
BEGIN
GET (FT, X);
FAILED ("DATA_ERROR NOT RAISED - 6");
EXCEPTION
WHEN DATA_ERROR =>
IF X /= GREYISH THEN
FAILED ("ACTUAL PARAMETER TO GET " &
"AFFECTED ON DATA_ERROR - 6");
END IF;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 6");
END;
IF END_OF_LINE (FT) THEN
FAILED ("GET STOPPED AT END OF LINE - 6");
ELSE
GET (FT, CH);
IF CH /= '_' THEN
FAILED ("GET STOPPED AT WRONG POSITION " &
"- 6: CHAR IS " & CH);
END IF;
END IF;
SKIP_LINE (FT);
BEGIN
GET (FT, X);
FAILED ("DATA_ERROR NOT RAISED - 7");
EXCEPTION
WHEN DATA_ERROR =>
IF X /= GREYISH THEN
FAILED ("ACTUAL PARAMETER TO GET " &
"AFFECTED ON DATA_ERROR - 7");
END IF;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 7");
END;
IF NOT END_OF_LINE (FT) THEN
BEGIN
GET (FT, X);
FAILED ("GET STOPPED AT WRONG POSITION " &
"- 7");
EXCEPTION
WHEN END_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED FOR " &
"EMPTY FILE - 7");
END;
END IF;
END;
BEGIN
DELETE (FT);
EXCEPTION
WHEN USE_ERROR =>
NULL;
END;
EXCEPTION
WHEN INCOMPLETE =>
NULL;
END;
RESULT;
END CE3905L;
|
function Fib(x: in Integer) return Integer is
Result : Integer;
begin
if x <= 1 then
Result := x;
else
Result := Fib(x-2) + Fib(x-1);
end if;
return Result;
end Fib;
|
-----------------------------------------------------------------------
-- gen-model -- Model for Code Generator
-- Copyright (C) 2009, 2010, 2011, 2012, 2018, 2019, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Strings.Fixed;
with Ada.Strings.Maps;
with DOM.Core.Nodes;
with Gen.Utils;
package body Gen.Model is
Trim_Chars : constant Ada.Strings.Maps.Character_Set
:= Ada.Strings.Maps.To_Set (" " & ASCII.HT & ASCII.LF & ASCII.CR);
-- ------------------------------
-- Get the object unique name.
-- ------------------------------
function Get_Name (From : in Definition) return String is
begin
return Ada.Strings.Unbounded.To_String (From.Def_Name);
end Get_Name;
function Name (From : in Definition) return Ada.Strings.Unbounded.Unbounded_String is
begin
return From.Def_Name;
end Name;
-- ------------------------------
-- Set the object unique name.
-- ------------------------------
procedure Set_Name (Def : in out Definition;
Name : in String) is
begin
Def.Def_Name := Ada.Strings.Unbounded.To_Unbounded_String (Name);
end Set_Name;
procedure Set_Name (Def : in out Definition;
Name : in Ada.Strings.Unbounded.Unbounded_String) is
begin
Def.Def_Name := Name;
end Set_Name;
-- ------------------------------
-- Get the value identified by the name.
-- If the name cannot be found, the method should return the Null object.
-- ------------------------------
function Get_Value (From : in Definition;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "comment" then
return From.Comment;
elsif Name = "rowIndex" then
return Util.Beans.Objects.To_Object (From.Row_Index);
elsif Name = "name" then
return Util.Beans.Objects.To_Object (From.Def_Name);
else
return From.Attrs.Get_Value (Name);
end if;
end Get_Value;
-- ------------------------------
-- Get the value identified by the name.
-- If the name cannot be found, the method should return the Null object.
-- ------------------------------
function Get_Attribute (From : in Definition;
Name : in String) return String is
V : constant Util.Beans.Objects.Object := From.Get_Value (Name);
begin
return Util.Beans.Objects.To_String (V);
end Get_Attribute;
-- ------------------------------
-- Get the value identified by the name.
-- If the name cannot be found, the method should return the Null object.
-- ------------------------------
function Get_Attribute (From : in Definition;
Name : in String) return Ada.Strings.Unbounded.Unbounded_String is
begin
return Ada.Strings.Unbounded.To_Unbounded_String (From.Get_Attribute (Name));
end Get_Attribute;
-- ------------------------------
-- Set the comment associated with the element.
-- ------------------------------
procedure Set_Comment (Def : in out Definition;
Comment : in String) is
Trimmed_Comment : constant String
:= Ada.Strings.Fixed.Trim (Comment, Trim_Chars, Trim_Chars);
begin
Def.Comment := Util.Beans.Objects.To_Object (Trimmed_Comment);
end Set_Comment;
-- ------------------------------
-- Get the comment associated with the element.
-- ------------------------------
function Get_Comment (Def : in Definition) return Util.Beans.Objects.Object is
begin
return Def.Comment;
end Get_Comment;
-- ------------------------------
-- Set the location (file and line) where the model element is defined in the XMI file.
-- ------------------------------
procedure Set_Location (Node : in out Definition;
Location : in String) is
begin
Node.Location := Ada.Strings.Unbounded.To_Unbounded_String (Location);
end Set_Location;
-- ------------------------------
-- Get the location file and line where the model element is defined.
-- ------------------------------
function Get_Location (Node : in Definition) return String is
begin
return Ada.Strings.Unbounded.To_String (Node.Location);
end Get_Location;
-- ------------------------------
-- Initialize the definition from the DOM node attributes.
-- ------------------------------
procedure Initialize (Def : in out Definition;
Name : in Ada.Strings.Unbounded.Unbounded_String;
Node : in DOM.Core.Node) is
use type DOM.Core.Node;
Attrs : constant DOM.Core.Named_Node_Map := DOM.Core.Nodes.Attributes (Node);
begin
Def.Def_Name := Name;
Def.Comment := Util.Beans.Objects.To_Object (Gen.Utils.Get_Comment (Node));
for I in 0 .. DOM.Core.Nodes.Length (Attrs) loop
declare
A : constant DOM.Core.Node := DOM.Core.Nodes.Item (Attrs, I);
begin
if A /= null then
declare
Name : constant DOM.Core.DOM_String := DOM.Core.Nodes.Node_Name (A);
Value : constant DOM.Core.DOM_String := DOM.Core.Nodes.Node_Value (A);
begin
Def.Attrs.Include (Name, Util.Beans.Objects.To_Object (Value));
end;
end if;
end;
end loop;
end Initialize;
-- ------------------------------
-- Validate the definition by checking and reporting problems to the logger interface.
-- ------------------------------
procedure Validate (Def : in out Definition;
Log : in out Util.Log.Logging'Class) is
begin
if Ada.Strings.Unbounded.Length (Def.Def_Name) = 0 then
Log.Error (Def.Get_Location & ": name is empty");
end if;
end Validate;
procedure Set_Index (Def : in out Definition;
Index : in Natural) is
begin
Def.Row_Index := Index;
end Set_Index;
end Gen.Model;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY COMPONENTS --
-- --
-- S Y S T E M . C O M P A R E _ A R R A Y _ S I G N E D _ 3 2 --
-- --
-- S p e c --
-- --
-- Copyright (C) 2002-2021, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains functions for runtime comparisons on arrays whose
-- elements are 32-bit discrete type values to be treated as signed.
package System.Compare_Array_Signed_32 is
-- Note: although the functions in this package are in a sense Pure, the
-- package cannot be declared as Pure, since the arguments are addresses,
-- not the data, and the result is not pure wrt the address values.
function Compare_Array_S32
(Left : System.Address;
Right : System.Address;
Left_Len : Natural;
Right_Len : Natural)
return Integer;
-- Compare the array starting at address Left of length Left_Len
-- with the array starting at address Right of length Right_Len.
-- The comparison is in the normal Ada semantic sense of array
-- comparison. The result is -1,0,+1 for Left<Right, Left=Right,
-- Left>Right respectively.
end System.Compare_Array_Signed_32;
|
-- C38107A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- FOR AN INCOMPLETE TYPE WITH DISCRIMINANTS DECLARED IN THE
-- VISIBLE PART OF A PACKAGE OR IN A DECLARATIVE PART, CHECK THAT
-- CONSTRAINT_ERROR IS RAISED IF A DISCRIMINANT CONSTRAINT IS
-- SPECIFIED FOR THE TYPE AND ONE OF THE DISCRIMINANT VALUES DOES
-- NOT BELONG TO THE CORRESPONDING DISCRIMINANT'S SUBTYPE.
-- HISTORY:
-- BCB 01/21/88 CREATED ORIGINAL TEST.
WITH REPORT; USE REPORT;
PROCEDURE C38107A IS
BEGIN
TEST ("C38107A", "FOR AN INCOMPLETE TYPE WITH DISCRIMINANTS " &
"DECLARED IN THE VISIBLE PART OF A PACKAGE OR " &
"IN A DECLARATIVE PART, CHECK THAT CONSTRAINT_" &
"ERROR IS RAISED IF A DISCRIMINANT CONSTRAINT " &
"IS SPECIFIED FOR THE TYPE AND ONE OF THE " &
"DISCRIMINANT VALUES DOES NOT BELONG TO THE " &
"CORRESPONDING DISCRIMINANT'S SUBTYPE");
BEGIN
DECLARE
PACKAGE P IS
SUBTYPE INT6 IS INTEGER RANGE 1 .. 6;
TYPE T_INT6 (D6 : INT6);
TYPE TEST IS ACCESS T_INT6(7); -- CONSTRAINT_ERROR.
TYPE T_INT6 (D6 : INT6) IS
RECORD
NULL;
END RECORD;
END P;
USE P;
BEGIN
FAILED ("CONSTRAINT_ERROR WAS NOT RAISED - 1");
DECLARE
T : P.TEST := NEW T_INT6(7);
BEGIN
IF EQUAL(T.D6, T.D6) THEN
COMMENT ("DON'T OPTIMIZE T.D6");
END IF;
END;
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("AN EXCEPTION OTHER THAN CONSTRAINT_ERROR " &
"WAS RAISED - 1");
END;
BEGIN
DECLARE
SUBTYPE INT7 IS INTEGER RANGE 1 .. 7;
TYPE T_INT7 (D7 : INT7);
TYPE TEST IS ACCESS T_INT7(8); -- CONSTRAINT_ERROR.
TYPE T_INT7 (D7 : INT7) IS
RECORD
NULL;
END RECORD;
BEGIN
FAILED ("CONSTRAINT_ERROR WAS NOT RAISED - 2");
DECLARE
T : TEST := NEW T_INT7(6);
BEGIN
IF EQUAL(T.D7, T.D7) THEN
COMMENT ("DON'T OPTIMIZE T.D7");
END IF;
END;
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("AN EXCEPTION OTHER THAN CONSTRAINT_ERROR " &
"WAS RAISED - 2");
END;
RESULT;
END C38107A;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
function League.Stream_Element_Vectors.Hash
(Item : League.Stream_Element_Vectors.Stream_Element_Vector)
return Ada.Containers.Hash_Type is
begin
return Ada.Containers.Hash_Type (Item.Hash);
end League.Stream_Element_Vectors.Hash;
|
--
-- Copyright (C) 2015-2016 secunet Security Networks AG
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
with HW.Time;
with HW.Debug;
with GNAT.Source_Info;
with HW.GFX.GMA.Config;
with HW.GFX.GMA.Registers;
with HW.GFX.GMA.Power_And_Clocks;
use type HW.Word8;
use type HW.GFX.GMA.Registers.Registers_Invalid_Index;
package body HW.GFX.GMA.DP_Aux_Request is
DP_AUX_CTL_SEND_BUSY : constant := 1 * 2 ** 31;
DP_AUX_CTL_DONE : constant := 1 * 2 ** 30;
DP_AUX_CTL_INTERRUPT_ON_DONE : constant := 1 * 2 ** 29;
DP_AUX_CTL_TIME_OUT_ERROR : constant := 1 * 2 ** 28;
DP_AUX_CTL_TIME_OUT_TIMER_MASK : constant := 3 * 2 ** 26;
DP_AUX_CTL_TIME_OUT_TIMER_400US : constant := 0 * 2 ** 26;
DP_AUX_CTL_TIME_OUT_TIMER_600US : constant := 1 * 2 ** 26;
DP_AUX_CTL_TIME_OUT_TIMER_800US : constant := 2 * 2 ** 26;
DP_AUX_CTL_TIME_OUT_TIMER_1600US : constant := 3 * 2 ** 26;
DP_AUX_CTL_RECEIVE_ERROR : constant := 1 * 2 ** 25;
DP_AUX_CTL_MESSAGE_SIZE_MASK : constant := 31 * 2 ** 20;
DP_AUX_CTL_MESSAGE_SIZE_SHIFT : constant := 2 ** 20;
DP_AUX_CTL_PRECHARGE_TIME_MASK : constant := 15 * 2 ** 16;
DP_AUX_CTL_PRECHARGE_TIME_SHIFT : constant := 2 ** 16;
DP_AUX_CTL_2X_BIT_CLOCK_DIV_MASK : constant := 2047 * 2 ** 0;
-- TODO: HSW/BDW with LPT-H might need a workaround for the 2x bit clock.
subtype DP_AUX_CTL_MESSAGE_SIZE_T is Natural range 1 .. 20;
function DP_AUX_CTL_MESSAGE_SIZE
(Message_Length : DP_AUX_CTL_MESSAGE_SIZE_T)
return Word32;
DDI_AUX_MUTEX_MUTEX_ENABLE : constant := 1 * 2 ** 31;
DDI_AUX_MUTEX_MUTEX_STATUS : constant := 1 * 2 ** 30;
type AUX_CH_Data_Regs is new Positive range 1 .. 5;
type AUX_CH_Data_Regs_Array is
array (AUX_CH_Data_Regs) of Registers.Registers_Index;
type AUX_CH_Registers is record
CTL : Registers.Registers_Index;
DATA : AUX_CH_Data_Regs_Array;
MUTEX : Registers.Registers_Invalid_Index;
end record;
type AUX_CH_Registers_Array is array (DP_Port) of AUX_CH_Registers;
AUX_CH : constant AUX_CH_Registers_Array :=
(if Config.Has_PCH_Aux_Channels then
AUX_CH_Registers_Array'
(DP_A => AUX_CH_Registers'
(CTL => Registers.DP_AUX_CTL_A,
DATA => AUX_CH_Data_Regs_Array'
(1 => Registers.DP_AUX_DATA_A_1,
2 => Registers.DP_AUX_DATA_A_2,
3 => Registers.DP_AUX_DATA_A_3,
4 => Registers.DP_AUX_DATA_A_4,
5 => Registers.DP_AUX_DATA_A_5),
MUTEX => Registers.Invalid_Register),
DP_B => AUX_CH_Registers'
(CTL => Registers.PCH_DP_AUX_CTL_B,
DATA => AUX_CH_Data_Regs_Array'
(1 => Registers.PCH_DP_AUX_DATA_B_1,
2 => Registers.PCH_DP_AUX_DATA_B_2,
3 => Registers.PCH_DP_AUX_DATA_B_3,
4 => Registers.PCH_DP_AUX_DATA_B_4,
5 => Registers.PCH_DP_AUX_DATA_B_5),
MUTEX => Registers.Invalid_Register),
DP_C => AUX_CH_Registers'
(CTL => Registers.PCH_DP_AUX_CTL_C,
DATA => AUX_CH_Data_Regs_Array'
(1 => Registers.PCH_DP_AUX_DATA_C_1,
2 => Registers.PCH_DP_AUX_DATA_C_2,
3 => Registers.PCH_DP_AUX_DATA_C_3,
4 => Registers.PCH_DP_AUX_DATA_C_4,
5 => Registers.PCH_DP_AUX_DATA_C_5),
MUTEX => Registers.Invalid_Register),
DP_D => AUX_CH_Registers'
(CTL => Registers.PCH_DP_AUX_CTL_D,
DATA => AUX_CH_Data_Regs_Array'
(1 => Registers.PCH_DP_AUX_DATA_D_1,
2 => Registers.PCH_DP_AUX_DATA_D_2,
3 => Registers.PCH_DP_AUX_DATA_D_3,
4 => Registers.PCH_DP_AUX_DATA_D_4,
5 => Registers.PCH_DP_AUX_DATA_D_5),
MUTEX => Registers.Invalid_Register))
else
AUX_CH_Registers_Array'
(DP_A => AUX_CH_Registers'
(CTL => Registers.DDI_AUX_CTL_A,
DATA => AUX_CH_Data_Regs_Array'
(1 => Registers.DDI_AUX_DATA_A_1,
2 => Registers.DDI_AUX_DATA_A_2,
3 => Registers.DDI_AUX_DATA_A_3,
4 => Registers.DDI_AUX_DATA_A_4,
5 => Registers.DDI_AUX_DATA_A_5),
MUTEX => Registers.DDI_AUX_MUTEX_A),
DP_B => AUX_CH_Registers'
(CTL => Registers.DDI_AUX_CTL_B,
DATA => AUX_CH_Data_Regs_Array'
(1 => Registers.DDI_AUX_DATA_B_1,
2 => Registers.DDI_AUX_DATA_B_2,
3 => Registers.DDI_AUX_DATA_B_3,
4 => Registers.DDI_AUX_DATA_B_4,
5 => Registers.DDI_AUX_DATA_B_5),
MUTEX => Registers.DDI_AUX_MUTEX_B),
DP_C => AUX_CH_Registers'
(CTL => Registers.DDI_AUX_CTL_C,
DATA => AUX_CH_Data_Regs_Array'
(1 => Registers.DDI_AUX_DATA_C_1,
2 => Registers.DDI_AUX_DATA_C_2,
3 => Registers.DDI_AUX_DATA_C_3,
4 => Registers.DDI_AUX_DATA_C_4,
5 => Registers.DDI_AUX_DATA_C_5),
MUTEX => Registers.DDI_AUX_MUTEX_C),
DP_D => AUX_CH_Registers'
(CTL => Registers.DDI_AUX_CTL_D,
DATA => AUX_CH_Data_Regs_Array'
(1 => Registers.DDI_AUX_DATA_D_1,
2 => Registers.DDI_AUX_DATA_D_2,
3 => Registers.DDI_AUX_DATA_D_3,
4 => Registers.DDI_AUX_DATA_D_4,
5 => Registers.DDI_AUX_DATA_D_5),
MUTEX => Registers.DDI_AUX_MUTEX_D)));
----------------------------------------------------------------------------
function DP_AUX_CTL_MESSAGE_SIZE
(Message_Length : DP_AUX_CTL_MESSAGE_SIZE_T)
return Word32
is
begin
return Word32 (Message_Length) * DP_AUX_CTL_MESSAGE_SIZE_SHIFT;
end DP_AUX_CTL_MESSAGE_SIZE;
----------------------------------------------------------------------------
procedure Aux_Request_Low
(Port : in DP_Port;
Request : in DP_Defs.Aux_Request;
Request_Length : in DP_Defs.Aux_Request_Length;
Response : out DP_Defs.Aux_Response;
Response_Length : out DP_Defs.Aux_Response_Length;
Success : out Boolean)
with
Global => (In_Out => Registers.Register_State,
Input => (Time.State, Config.Raw_Clock)),
Depends =>
((Registers.Register_State,
Response,
Response_Length,
Success)
=>
(Registers.Register_State,
Config.Raw_Clock,
Time.State,
Port,
Request,
Request_Length))
is
procedure Write_Data_Reg
(Register : in Registers.Registers_Index;
Buf : in DP_Defs.Aux_Request;
Length : in DP_Defs.Aux_Request_Length;
Offset : in DP_Defs.Aux_Request_Index)
is
Value : Word32;
Count : Natural;
begin
if Offset < Length then
if Length - Offset > 4 then
Count := 4;
else
Count := Length - Offset;
end if;
Value := 0;
for Idx in DP_Defs.Aux_Request_Index range 0 .. Count - 1 loop
Value := Value or
Shift_Left (Word32 (Buf (Offset + Idx)), (3 - Idx) * 8);
end loop;
Registers.Write (Register => Register, Value => Value);
end if;
end Write_Data_Reg;
procedure Read_Data_Reg
(Register : in Registers.Registers_Index;
Buf : in out DP_Defs.Aux_Response;
Length : in DP_Defs.Aux_Response_Length;
Offset : in DP_Defs.Aux_Response_Index)
is
Value : Word32;
Count : DP_Defs.Aux_Response_Length;
begin
if Offset < Length then
if Length - Offset > 4 then
Count := 4;
else
Count := Length - Offset;
end if;
Registers.Read (Register => Register, Value => Value);
for Idx in 0 .. Count - 1 loop
Buf (Offset + Idx) :=
Word8 (Shift_Right (Value, (3 - Idx) * 8) and 16#ff#);
end loop;
end if;
end Read_Data_Reg;
DP_AUX_CTL_2x_Clock_Mask : constant :=
(if Config.Has_PCH_Aux_Channels then
DP_AUX_CTL_2X_BIT_CLOCK_DIV_MASK else 0);
DP_AUX_CTL_2x_Clock : constant Word32 :=
(if Config.Has_PCH_Aux_Channels then
(if Port = DP_A then
Word32 ((Config.Default_CDClk_Freq + 1_000_000) / 2_000_000)
else
Word32 ((Config.Raw_Clock + 1_000_000) / 2_000_000))
elsif Config.Has_GMCH_RawClk then
Word32 (Div_Round_Closest (Config.Raw_Clock, 2_000_000))
else 0);
Busy : Boolean;
Status : Word32;
begin
Response := (others => 0); -- Don't care
Response_Length := DP_Defs.Aux_Response_Length'First;
if Config.Need_DP_Aux_Mutex then
Registers.Set_Mask
(Register => AUX_CH (Port).MUTEX,
Mask => DDI_AUX_MUTEX_MUTEX_ENABLE);
Registers.Wait_Set_Mask
(Register => AUX_CH (Port).MUTEX,
Mask => DDI_AUX_MUTEX_MUTEX_STATUS);
end if;
Registers.Is_Set_Mask
(Register => AUX_CH (Port).CTL,
Mask => DP_AUX_CTL_SEND_BUSY,
Result => Busy);
if Busy then
Success := False;
else
for Idx in AUX_CH_Data_Regs loop
Write_Data_Reg
(Register => AUX_CH (Port).DATA (Idx),
Buf => Request,
Length => Request_Length,
Offset => (Natural (Idx) - 1) * 4);
end loop;
Registers.Unset_And_Set_Mask
(Register => AUX_CH (Port).CTL,
Mask_Unset => DP_AUX_CTL_INTERRUPT_ON_DONE or
DP_AUX_CTL_TIME_OUT_TIMER_MASK or
DP_AUX_CTL_MESSAGE_SIZE_MASK or
DP_AUX_CTL_2x_Clock_Mask,
Mask_Set => DP_AUX_CTL_SEND_BUSY or -- starts transfer
DP_AUX_CTL_DONE or -- clears the status
DP_AUX_CTL_TIME_OUT_ERROR or -- clears the status
DP_AUX_CTL_RECEIVE_ERROR or -- clears the status
DP_AUX_CTL_TIME_OUT_TIMER_600US or
DP_AUX_CTL_MESSAGE_SIZE (Request_Length) or
DP_AUX_CTL_2x_Clock);
Registers.Wait_Unset_Mask
(Register => AUX_CH (Port).CTL,
Mask => DP_AUX_CTL_SEND_BUSY);
Registers.Read (Register => AUX_CH (Port).CTL, Value => Status);
Success := (Status and
(DP_AUX_CTL_TIME_OUT_ERROR or DP_AUX_CTL_RECEIVE_ERROR))
= 0;
if Success then
Status := (Status and DP_AUX_CTL_MESSAGE_SIZE_MASK)
/ DP_AUX_CTL_MESSAGE_SIZE_SHIFT;
if Natural (Status) < DP_Defs.Aux_Response_Length'First then
Success := False;
elsif Natural (Status) > DP_Defs.Aux_Response_Length'Last then
Response_Length := DP_Defs.Aux_Response_Length'Last;
else
Response_Length := Natural (Status);
end if;
end if;
if Success then
for Idx in AUX_CH_Data_Regs loop
Read_Data_Reg
(Register => AUX_CH (Port).DATA (Idx),
Buf => Response,
Length => Response_Length,
Offset => (Natural (Idx) - 1) * 4);
end loop;
end if;
end if;
if Config.Need_DP_Aux_Mutex then
Registers.Unset_And_Set_Mask
(Register => AUX_CH (Port).MUTEX,
Mask_Unset => DDI_AUX_MUTEX_MUTEX_ENABLE,
Mask_Set => DDI_AUX_MUTEX_MUTEX_STATUS); -- frees the mutex
end if;
end Aux_Request_Low;
----------------------------------------------------------------------------
procedure Do_Aux_Request
(Port : in DP_Port;
Request : in DP_Defs.Aux_Request;
Request_Length : in DP_Defs.Aux_Request_Length;
Response : out DP_Defs.Aux_Response;
Response_Length : out DP_Defs.Aux_Response_Length;
Success : out Boolean)
is
begin
for Try in Positive range 1 .. 3 loop
Aux_Request_Low
(Port => Port,
Request => Request,
Request_Length => Request_Length,
Response => Response,
Response_Length => Response_Length,
Success => Success);
exit when Success;
end loop;
end Do_Aux_Request;
end HW.GFX.GMA.DP_Aux_Request;
|
-------------------------------------------------------------------------------
-- Copyright (c) 2016 Daniel King
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the "Software"),
-- to deal in the Software without restriction, including without limitation
-- the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- and/or sell copies of the Software, and to permit persons to whom the
-- Software is furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in
-- all copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-- DEALINGS IN THE SOFTWARE.
-------------------------------------------------------------------------------
with AUnit.Test_Fixtures;
package DW1000.System_Time.Tests
is
type Test is new AUnit.Test_Fixtures.Test_Fixture with null record;
procedure Test_Bits_40_Fine (T : in out Test);
-- Proves the following property:
-- (for all X in Bits_40'Range =>
-- X = To_Bits_40 (To_Fine_System_Time (X)))
procedure Test_Bits_40_Coarse (T : in out Test);
-- Proves the following property:
-- (for all X in Bits_40'Range =>
-- X = To_Bits_40 (To_Coarse_System_Time (X)))
procedure Test_To_Coarse_System_Time (T : in out Test);
-- Proves the following property:
-- (for all X in Coarse_System_Time =>
-- X = To_Coarse_System_Time (To_Fine_System_Time (X)))
end DW1000.System_Time.Tests;
|
-- C38005A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT ALL (UNINITIALIZED) ACCESS OBJECTS ARE INITIALIZED
-- TO NULL BY DEFAULT. VARIABLES, ARRAYS, RECORDS, ARRAYS OF RECORDS,
-- ARRAYS OF ARRAYS, RECORDS WITH ARRAYS AND RECORD COMPONENTS
-- ARE ALL CHECKED.
-- FUNCTION RESULTS (I.E. RETURNED FROM IMPLICIT FUNCTION RETURN)
-- ARE NOT CHECKED.
-- DAT 3/6/81
-- VKG 1/5/83
-- SPS 2/17/83
WITH REPORT; USE REPORT;
PROCEDURE C38005A IS
TYPE REC;
TYPE ACC_REC IS ACCESS REC;
TYPE VECTOR IS ARRAY ( NATURAL RANGE <> ) OF ACC_REC;
TYPE REC IS RECORD
VECT : VECTOR (3 .. 5);
END RECORD;
TYPE ACC_VECT IS ACCESS VECTOR;
TYPE ARR_REC IS ARRAY (1 .. 2) OF REC;
TYPE REC2;
TYPE ACC_REC2 IS ACCESS REC2;
TYPE REC2 IS RECORD
C1 : ACC_REC;
C2 : ACC_VECT;
C3 : ARR_REC;
C4 : REC;
C5 : ACC_REC2;
END RECORD;
N_REC : REC;
N_ACC_REC : ACC_REC;
N_VEC : VECTOR (3 .. IDENT_INT (5));
N_ACC_VECT : ACC_VECT;
N_ARR_REC : ARR_REC;
N_REC2 : REC2;
N_ACC_REC2 : ACC_REC2;
N_ARR : ARRAY (1..2) OF VECTOR (1..2);
Q : REC2 :=
(C1 => NEW REC,
C2 => NEW VECTOR'(NEW REC, NEW REC'(N_REC)),
C3 => (1 | 2 => (VECT=>(3|4=> NEW REC,
5=>N_ACC_REC)
)),
C4 => N_REC2.C4,
C5 => NEW REC2'(N_REC2));
BEGIN
TEST ("C38005A", "DEFAULT VALUE FOR ACCESS OBJECTS IS NULL");
IF N_REC /= REC'(VECT => (3..5 => NULL))
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 1");
END IF;
IF N_ACC_REC /= NULL
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 2");
END IF;
IF N_VEC /= N_REC.VECT
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 3");
END IF;
IF N_ARR /= ((NULL, NULL), (NULL, NULL))
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 4");
END IF;
IF N_ACC_VECT /= NULL
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 5");
END IF;
IF N_ARR_REC /= (N_REC, N_REC)
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 6");
END IF;
IF N_REC2 /= (NULL, NULL, N_ARR_REC, N_REC, NULL)
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 7");
END IF;
IF N_ACC_REC2 /= NULL
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 8");
END IF;
IF Q /= (Q.C1, Q.C2, (Q.C3(1), Q.C3(2)), N_REC, Q.C5)
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 9");
END IF;
IF Q.C1.ALL /= N_REC
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 10");
END IF;
IF Q.C2.ALL(0).ALL /= N_REC
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 11");
END IF;
IF Q.C2(1).VECT /= N_VEC
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 12");
END IF;
IF Q.C3(2).VECT /= (3 => Q.C3(2).VECT(3),
4 => Q.C3(2).VECT(4),
5=>NULL)
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 13");
END IF;
IF Q.C3(2).VECT(3).ALL /= N_REC
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 14");
END IF;
IF Q.C5.ALL /= N_REC2
THEN
FAILED ("INCORRECT ACCESS TYPE INITIALIZATION - 15");
END IF;
DECLARE
PROCEDURE T (R : OUT REC2) IS
BEGIN
NULL;
END T;
BEGIN
N_REC2 := Q;
T(Q);
IF Q /= N_REC2 THEN
FAILED ("INCORRECT OUT PARM INIT 2");
END IF;
END;
RESULT;
END C38005A;
|
-----------------------------------------------------------------------
-- awa-applications -- Ada Web Application
-- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017, 2018 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Serialize.IO;
with ASF.Applications.Main;
with ASF.Applications.Main.Configs;
with ADO.Sessions.Factory;
with AWA.Modules;
with AWA.Events;
with AWA.Events.Services;
with AWA.Audits.Services;
package AWA.Applications is
-- Directories where the configuration files are searched.
package P_Module_Dir is
new ASF.Applications.Main.Configs.Parameter ("app.modules.dir",
"#{fn:composePath(app_search_dirs,'config')}");
-- A list of configuration files separated by ';'. These files are searched in
-- 'app.modules.dir' and loaded in the order specified before the application modules.
package P_Config_File is
new ASF.Applications.Main.Configs.Parameter ("app.config", "awa.xml");
-- A list of configuration files separated by ';'. These files are searched in
-- 'app.modules.dir' and loaded in the order specified after all the application modules
-- are initialized.
package P_Plugin_Config_File is
new ASF.Applications.Main.Configs.Parameter ("app.config.plugins", "");
-- The database connection string to connect to the database.
package P_Database is
new ASF.Applications.Main.Configs.Parameter ("database",
"mysql://localhost:3306/db");
-- The application contextPath configuration that gives the base URL of the application.
package P_Context_Path is
new ASF.Applications.Main.Configs.Parameter ("contextPath",
"");
-- Module manager
--
-- The <b>Module_Manager</b> represents the root of the logic manager
type Application is new ASF.Applications.Main.Application with private;
type Application_Access is access all Application'Class;
-- Initialize the application
overriding
procedure Initialize (App : in out Application;
Conf : in ASF.Applications.Config;
Factory : in out ASF.Applications.Main.Application_Factory'Class);
-- Initialize the application configuration properties. Properties defined in <b>Conf</b>
-- are expanded by using the EL expression resolver.
overriding
procedure Initialize_Config (App : in out Application;
Conf : in out ASF.Applications.Config);
-- Initialize the servlets provided by the application.
-- This procedure is called by <b>Initialize</b>.
-- It should register the application servlets.
overriding
procedure Initialize_Servlets (App : in out Application);
-- Initialize the filters provided by the application.
-- This procedure is called by <b>Initialize</b>.
-- It should register the application filters.
overriding
procedure Initialize_Filters (App : in out Application);
-- Initialize the ASF components provided by the application.
-- This procedure is called by <b>Initialize</b>.
-- It should register the component factories used by the application.
overriding
procedure Initialize_Components (App : in out Application);
-- Read the application configuration file <b>awa.xml</b>. This is called after the servlets
-- and filters have been registered in the application but before the module registration.
procedure Load_Configuration (App : in out Application;
Files : in String);
-- Initialize the AWA modules provided by the application.
-- This procedure is called by <b>Initialize</b>.
-- It should register the modules used by the application.
procedure Initialize_Modules (App : in out Application);
-- Start the application. This is called by the server container when the server is started.
overriding
procedure Start (App : in out Application);
-- Close the application.
overriding
procedure Close (App : in out Application);
-- Register the module in the application
procedure Register (App : in Application_Access;
Module : access AWA.Modules.Module'Class;
Name : in String;
URI : in String := "");
-- Get the database connection for reading
function Get_Session (App : Application)
return ADO.Sessions.Session;
-- Get the database connection for writing
function Get_Master_Session (App : Application)
return ADO.Sessions.Master_Session;
-- Register the module in the application
procedure Register (App : in out Application;
Module : in AWA.Modules.Module_Access;
Name : in String;
URI : in String := "");
-- Find the module with the given name
function Find_Module (App : in Application;
Name : in String) return AWA.Modules.Module_Access;
-- Send the event in the application event queues.
procedure Send_Event (App : in Application;
Event : in AWA.Events.Module_Event'Class);
-- Execute the <tt>Process</tt> procedure with the event manager used by the application.
procedure Do_Event_Manager (App : in out Application;
Process : access procedure
(Events : in out AWA.Events.Services.Event_Manager));
-- Get the current application from the servlet context or service context.
function Current return Application_Access;
private
-- Initialize the parser represented by <b>Parser</b> to recognize the configuration
-- that are specific to the plugins that have been registered so far.
procedure Initialize_Parser (App : in out Application'Class;
Parser : in out Util.Serialize.IO.Parser'Class);
type Application is new ASF.Applications.Main.Application with record
DB_Factory : ADO.Sessions.Factory.Session_Factory;
Modules : aliased AWA.Modules.Module_Registry;
Events : aliased AWA.Events.Services.Event_Manager;
Audits : aliased AWA.Audits.Services.Audit_Manager;
end record;
end AWA.Applications;
|
-- Copyright 2016 Steven Stewart-Gallus
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-- implied. See the License for the specific language governing
-- permissions and limitations under the License.
with System;
with Pulse.Def;
package Pulse.Operation with
Spark_Mode => Off is
-- skipped empty struct pa_operation
type pa_operation_notify_cb_t is access procedure
(arg1 : System.Address;
arg2 : System.Address);
pragma Convention
(C,
pa_operation_notify_cb_t); -- /usr/include/pulse/operation.h:38
function pa_operation_ref
(o : System.Address)
return System.Address; -- /usr/include/pulse/operation.h:41
pragma Import (C, pa_operation_ref, "pa_operation_ref");
procedure pa_operation_unref
(o : System.Address); -- /usr/include/pulse/operation.h:44
pragma Import (C, pa_operation_unref, "pa_operation_unref");
procedure pa_operation_cancel
(o : System.Address); -- /usr/include/pulse/operation.h:51
pragma Import (C, pa_operation_cancel, "pa_operation_cancel");
function pa_operation_get_state
(o : System.Address)
return Pulse.Def
.pa_operation_state_t; -- /usr/include/pulse/operation.h:54
pragma Import (C, pa_operation_get_state, "pa_operation_get_state");
procedure pa_operation_set_state_callback
(o : System.Address;
cb : pa_operation_notify_cb_t;
userdata : System.Address); -- /usr/include/pulse/operation.h:62
pragma Import
(C,
pa_operation_set_state_callback,
"pa_operation_set_state_callback");
end Pulse.Operation;
|
pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with stddef_h;
with System;
package alloca_h is
-- arg-macro: procedure alloca (size)
-- __builtin_alloca (size)
-- Copyright (C) 1992-2021 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <https://www.gnu.org/licenses/>.
-- Remove any previous definition.
-- Allocate a block that will be freed when the calling function exits.
function alloca (uu_size : stddef_h.size_t) return System.Address -- /usr/include/alloca.h:32
with Import => True,
Convention => C,
External_Name => "alloca";
end alloca_h;
|
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . O S _ I N T E R F A C E --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1997-2001 Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is the VxWorks version of this package.
--
-- VxWorks does not directly support the needed POSIX routines, but it
-- does have other routines that make it possible to code equivalent
-- POSIX compliant routines. The approach taken is to provide an
-- FSU threads compliant interface.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package
-- or remove the pragma Elaborate_Body.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C;
with System.VxWorks;
package System.OS_Interface is
pragma Preelaborate;
subtype int is Interfaces.C.int;
subtype short is Interfaces.C.short;
subtype long is Interfaces.C.long;
subtype unsigned is Interfaces.C.unsigned;
subtype unsigned_short is Interfaces.C.unsigned_short;
subtype unsigned_long is Interfaces.C.unsigned_long;
subtype unsigned_char is Interfaces.C.unsigned_char;
subtype plain_char is Interfaces.C.plain_char;
subtype size_t is Interfaces.C.size_t;
subtype char is Interfaces.C.char;
-----------
-- Errno --
-----------
function errno return int;
pragma Import (C, errno, "errnoGet");
EINTR : constant := 4;
EAGAIN : constant := 35;
ENOMEM : constant := 12;
EINVAL : constant := 22;
ETIMEDOUT : constant := 60;
FUNC_ERR : constant := -1;
----------------------------
-- Signals and Interrupts --
----------------------------
-- In order to support both signal and hardware interrupt handling,
-- the ranges of "interrupt IDs" for the vectored hardware interrupts
-- and the signals are catenated. In other words, the external IDs
-- used to designate signals are relocated beyond the range of the
-- vectored interrupts. The IDs given in Ada.Interrupts.Names should
-- be used to designate signals; vectored interrupts are designated
-- by their interrupt number.
NSIG : constant := 32;
-- Number of signals on the target OS
type Signal is new int range 0 .. Interfaces.C."-" (NSIG, 1);
Max_HW_Interrupt : constant := System.VxWorks.Num_HW_Interrupts - 1;
type HW_Interrupt is new int range 0 .. Max_HW_Interrupt;
Max_Interrupt : constant := Max_HW_Interrupt + NSIG;
SIGILL : constant := 4; -- illegal instruction (not reset)
SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future
SIGFPE : constant := 8; -- floating point exception
SIGBUS : constant := 10; -- bus error
SIGSEGV : constant := 11; -- segmentation violation
-----------------------------------
-- Signal processing definitions --
-----------------------------------
-- The how in sigprocmask().
SIG_BLOCK : constant := 1;
SIG_UNBLOCK : constant := 2;
SIG_SETMASK : constant := 3;
-- The sa_flags in struct sigaction.
SA_SIGINFO : constant := 16#0002#;
SA_ONSTACK : constant := 16#0004#;
-- ANSI args and returns from signal().
SIG_DFL : constant := 0;
SIG_IGN : constant := 1;
type sigset_t is private;
type struct_sigaction is record
sa_handler : System.Address;
sa_mask : sigset_t;
sa_flags : int;
end record;
pragma Convention (C, struct_sigaction);
type struct_sigaction_ptr is access all struct_sigaction;
function sigaddset (set : access sigset_t; sig : Signal) return int;
pragma Import (C, sigaddset, "sigaddset");
function sigdelset (set : access sigset_t; sig : Signal) return int;
pragma Import (C, sigdelset, "sigdelset");
function sigfillset (set : access sigset_t) return int;
pragma Import (C, sigfillset, "sigfillset");
function sigismember (set : access sigset_t; sig : Signal) return int;
pragma Import (C, sigismember, "sigismember");
function sigemptyset (set : access sigset_t) return int;
pragma Import (C, sigemptyset, "sigemptyset");
function sigaction
(sig : Signal;
act : struct_sigaction_ptr;
oact : struct_sigaction_ptr) return int;
pragma Import (C, sigaction, "sigaction");
type isr_address is access procedure (sig : int);
function c_signal (sig : Signal; handler : isr_address) return isr_address;
pragma Import (C, c_signal, "signal");
function sigwait (set : access sigset_t; sig : access Signal) return int;
pragma Inline (sigwait);
type sigset_t_ptr is access all sigset_t;
function pthread_sigmask
(how : int;
set : sigset_t_ptr;
oset : sigset_t_ptr) return int;
pragma Import (C, pthread_sigmask, "sigprocmask");
----------
-- Time --
----------
type time_t is new unsigned_long;
type timespec is record
ts_sec : time_t;
ts_nsec : long;
end record;
pragma Convention (C, timespec);
type clockid_t is private;
CLOCK_REALTIME : constant clockid_t; -- System wide realtime clock
function To_Duration (TS : timespec) return Duration;
pragma Inline (To_Duration);
function To_Timespec (D : Duration) return timespec;
pragma Inline (To_Timespec);
function To_Clock_Ticks (D : Duration) return int;
-- Convert a duration value (in seconds) into clock ticks.
function clock_gettime
(clock_id : clockid_t; tp : access timespec) return int;
pragma Import (C, clock_gettime, "clock_gettime");
-------------------------
-- Priority Scheduling --
-------------------------
-- Scheduling policies.
SCHED_FIFO : constant := 1;
SCHED_RR : constant := 2;
SCHED_OTHER : constant := 4;
-------------
-- Threads --
-------------
type Thread_Body is access
function (arg : System.Address) return System.Address;
type pthread_t is private;
subtype Thread_Id is pthread_t;
null_pthread : constant pthread_t;
type pthread_mutex_t is limited private;
type pthread_cond_t is limited private;
type pthread_attr_t is limited private;
type pthread_mutexattr_t is limited private;
type pthread_condattr_t is limited private;
type pthread_key_t is private;
PTHREAD_CREATE_DETACHED : constant := 0;
PTHREAD_CREATE_JOINABLE : constant := 1;
function kill (pid : pthread_t; sig : Signal) return int;
pragma Import (C, kill, "kill");
-- VxWorks doesn't have getpid; taskIdSelf is the equivalent
-- routine.
function getpid return pthread_t;
pragma Import (C, getpid, "taskIdSelf");
---------------------------------
-- Nonstandard Thread Routines --
---------------------------------
procedure pthread_init;
pragma Inline (pthread_init);
-- Vxworks requires this for the moment.
function taskIdSelf return pthread_t;
pragma Import (C, taskIdSelf, "taskIdSelf");
function taskSuspend (tid : pthread_t) return int;
pragma Import (C, taskSuspend, "taskSuspend");
function taskResume (tid : pthread_t) return int;
pragma Import (C, taskResume, "taskResume");
function taskIsSuspended (tid : pthread_t) return int;
pragma Import (C, taskIsSuspended, "taskIsSuspended");
function taskVarAdd
(tid : pthread_t;
pVar : access System.Address) return int;
pragma Import (C, taskVarAdd, "taskVarAdd");
function taskVarDelete
(tid : pthread_t;
pVar : access System.Address) return int;
pragma Import (C, taskVarDelete, "taskVarDelete");
function taskVarSet
(tid : pthread_t;
pVar : access System.Address;
value : System.Address) return int;
pragma Import (C, taskVarSet, "taskVarSet");
function taskVarGet
(tid : pthread_t;
pVar : access System.Address) return int;
pragma Import (C, taskVarGet, "taskVarGet");
function taskInfoGet
(tid : pthread_t;
pTaskDesc : access System.VxWorks.TASK_DESC) return int;
pragma Import (C, taskInfoGet, "taskInfoGet");
function taskDelay (ticks : int) return int;
pragma Import (C, taskDelay, "taskDelay");
function sysClkRateGet return int;
pragma Import (C, sysClkRateGet, "sysClkRateGet");
--------------------------
-- POSIX.1c Section 11 --
--------------------------
function pthread_mutexattr_init
(attr : access pthread_mutexattr_t) return int;
pragma Inline (pthread_mutexattr_init);
function pthread_mutexattr_destroy
(attr : access pthread_mutexattr_t) return int;
pragma Inline (pthread_mutexattr_destroy);
function pthread_mutex_init
(mutex : access pthread_mutex_t;
attr : access pthread_mutexattr_t) return int;
pragma Inline (pthread_mutex_init);
function pthread_mutex_destroy (mutex : access pthread_mutex_t) return int;
pragma Inline (pthread_mutex_destroy);
function pthread_mutex_lock (mutex : access pthread_mutex_t) return int;
pragma Inline (pthread_mutex_lock);
function pthread_mutex_unlock (mutex : access pthread_mutex_t) return int;
pragma Inline (pthread_mutex_unlock);
function pthread_condattr_init
(attr : access pthread_condattr_t) return int;
pragma Inline (pthread_condattr_init);
function pthread_condattr_destroy
(attr : access pthread_condattr_t) return int;
pragma Inline (pthread_condattr_destroy);
function pthread_cond_init
(cond : access pthread_cond_t;
attr : access pthread_condattr_t) return int;
pragma Inline (pthread_cond_init);
function pthread_cond_destroy (cond : access pthread_cond_t) return int;
pragma Inline (pthread_cond_destroy);
function pthread_cond_signal (cond : access pthread_cond_t) return int;
pragma Inline (pthread_cond_signal);
function pthread_cond_wait
(cond : access pthread_cond_t;
mutex : access pthread_mutex_t) return int;
pragma Inline (pthread_cond_wait);
function pthread_cond_timedwait
(cond : access pthread_cond_t;
mutex : access pthread_mutex_t;
abstime : access timespec) return int;
pragma Inline (pthread_cond_timedwait);
--------------------------
-- POSIX.1c Section 13 --
--------------------------
PTHREAD_PRIO_NONE : constant := 0;
PTHREAD_PRIO_PROTECT : constant := 2;
PTHREAD_PRIO_INHERIT : constant := 1;
function pthread_mutexattr_setprotocol
(attr : access pthread_mutexattr_t;
protocol : int) return int;
pragma Inline (pthread_mutexattr_setprotocol);
function pthread_mutexattr_setprioceiling
(attr : access pthread_mutexattr_t;
prioceiling : int) return int;
pragma Inline (pthread_mutexattr_setprioceiling);
type struct_sched_param is record
sched_priority : int;
end record;
function pthread_setschedparam
(thread : pthread_t;
policy : int;
param : access struct_sched_param) return int;
pragma Inline (pthread_setschedparam);
function sched_yield return int;
pragma Inline (sched_yield);
function pthread_sched_rr_set_interval (usecs : int) return int;
pragma Inline (pthread_sched_rr_set_interval);
---------------------------
-- P1003.1c - Section 16 --
---------------------------
function pthread_attr_init (attr : access pthread_attr_t) return int;
pragma Inline (pthread_attr_init);
function pthread_attr_destroy (attr : access pthread_attr_t) return int;
pragma Inline (pthread_attr_destroy);
function pthread_attr_setdetachstate
(attr : access pthread_attr_t;
detachstate : int) return int;
pragma Inline (pthread_attr_setdetachstate);
function pthread_attr_setstacksize
(attr : access pthread_attr_t;
stacksize : size_t) return int;
pragma Inline (pthread_attr_setstacksize);
function pthread_attr_setname_np
(attr : access pthread_attr_t;
name : System.Address) return int;
-- In VxWorks tasks, we have a non-portable routine to set the
-- task name. This makes it really convenient for debugging.
pragma Inline (pthread_attr_setname_np);
function pthread_create
(thread : access pthread_t;
attr : access pthread_attr_t;
start_routine : Thread_Body;
arg : System.Address) return int;
pragma Inline (pthread_create);
function pthread_detach (thread : pthread_t) return int;
pragma Inline (pthread_detach);
procedure pthread_exit (status : System.Address);
pragma Inline (pthread_exit);
function pthread_self return pthread_t;
pragma Inline (pthread_self);
function pthread_equal (t1 : pthread_t; t2 : pthread_t) return int;
pragma Inline (pthread_equal);
-- be careful not to use "=" on thread_t!
--------------------------
-- POSIX.1c Section 17 --
--------------------------
function pthread_setspecific
(key : pthread_key_t;
value : System.Address) return int;
pragma Inline (pthread_setspecific);
function pthread_getspecific (key : pthread_key_t) return System.Address;
pragma Inline (pthread_getspecific);
type destructor_pointer is access procedure (arg : System.Address);
function pthread_key_create
(key : access pthread_key_t;
destructor : destructor_pointer) return int;
pragma Inline (pthread_key_create);
-- VxWorks binary semaphores. These are exported for use by the
-- implementation of hardware interrupt handling.
subtype STATUS is int;
-- Equivalent of the C type STATUS
OK : constant STATUS := 0;
ERROR : constant STATUS := Interfaces.C."-" (1);
-- Semaphore creation flags.
SEM_Q_FIFO : constant := 0;
SEM_Q_PRIORITY : constant := 1;
SEM_DELETE_SAFE : constant := 4; -- only valid for binary semaphore
SEM_INVERSION_SAFE : constant := 8; -- only valid for binary semaphore
-- Semaphore initial state flags;
SEM_EMPTY : constant := 0;
SEM_FULL : constant := 1;
-- Semaphore take (semTake) time constants.
WAIT_FOREVER : constant := -1;
NO_WAIT : constant := 0;
type SEM_ID is new long;
-- The VxWorks semaphore ID is an integer which is really just
-- a pointer to a semaphore structure.
function semBCreate (Options : int; Initial_State : int) return SEM_ID;
-- Create a binary semaphore. Returns ID, or 0 if memory could not
-- be allocated
pragma Import (C, semBCreate, "semBCreate");
function semTake (SemID : SEM_ID; Timeout : int) return STATUS;
-- Attempt to take binary semaphore. Error is returned if operation
-- times out
pragma Import (C, semTake, "semTake");
function semGive (SemID : SEM_ID) return STATUS;
-- Release one thread blocked on the semaphore
pragma Import (C, semGive, "semGive");
function semFlush (SemID : SEM_ID) return STATUS;
-- Release all threads blocked on the semaphore
pragma Import (C, semFlush, "semFlush");
function semDelete (SemID : SEM_ID) return STATUS;
-- Delete a semaphore
pragma Import (C, semDelete, "semDelete");
private
-- This interface assumes that "unsigned" and "int" are 32-bit entities.
type sigset_t is new long;
type pid_t is new int;
ERROR_PID : constant pid_t := -1;
type clockid_t is new int;
CLOCK_REALTIME : constant clockid_t := 0;
-- Priority ceilings are now implemented in the body of
-- this package.
type pthread_mutexattr_t is record
Flags : int; -- mutex semaphore creation flags
Prio_Ceiling : int; -- priority ceiling
Protocol : int;
end record;
type pthread_mutex_t is record
Mutex : SEM_ID;
Protocol : int;
Prio_Ceiling : int; -- priority ceiling of lock
end record;
type pthread_condattr_t is record
Flags : int;
end record;
type pthread_cond_t is record
Sem : SEM_ID; -- VxWorks semaphore ID
Waiting : Integer; -- Number of queued tasks waiting
end record;
type pthread_attr_t is record
Stacksize : size_t;
Detachstate : int;
Priority : int;
Taskname : System.Address;
end record;
type pthread_t is new long;
null_pthread : constant pthread_t := 0;
type pthread_key_t is new int;
-- These are to store the pthread_keys that are created with
-- pthread_key_create. Currently, we only need one key.
Key_Storage : array (1 .. 10) of aliased System.Address;
Keys_Created : Integer;
Time_Slice : int;
end System.OS_Interface;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E X P _ S M E M --
-- --
-- S p e c --
-- --
-- Copyright (C) 1998-2000, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains routines involved in the required expansions for
-- handling shared memory accesses for variables in Shared_Passive packages.
-- See detailed documentation in System.Shared_Storage spec for a full
-- description of the approach that is taken for handling distributed
-- shared memory. This expansion unit in the compiler is responsible
-- for generating the calls to routines in System.Shared_Storage.
with Types; use Types;
package Exp_Smem is
procedure Expand_Shared_Passive_Variable (N : Node_Id);
-- N is the identifier for a shared passive variable. This routine is
-- responsible for determining if this is an assigned to N, or a
-- reference to N, and generating the required calls to the shared
-- memory read/write procedures.
procedure Add_Shared_Var_Lock_Procs (N : Node_Id);
-- The argument is a protected subprogram call, before it is rewritten
-- by Exp_Ch9.Build_Protected_Subprogram_Call. This routine, which is
-- called only in the case of an external call to a protected object
-- that has Is_Shared_Passive set, deals with installing the required
-- global lock calls for this case. It also generates the necessary
-- read/write calls for the protected object within the lock region.
procedure Make_Shared_Var_Procs (N : Node_Id);
-- N is the node for the declaration of a shared passive variable. This
-- procedure constructs and inserts the read and assignment procedures
-- for the shared memory variable. See System.Shared_Storage for a full
-- description of these procedures and how they are used.
end Exp_Smem;
|
------------------------------------------------------------------------------
-- G E L A A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of this file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
-- Purpose:
generic
type Item_Type is private;
type Index_Type is range <>;
package Gela.Containers.Vectors is
pragma Preelaborate;
type Vector is private;
procedure Add
(Object : in out Vector;
Item : in Item_Type);
procedure Clear (Object : in out Vector);
procedure Free (Object : in out Vector);
function Length (Object : Vector) return Index_Type'Base;
function Get (Object : Vector; Index : Index_Type) return Item_Type;
procedure Set
(Object : in out Vector;
Index : in Index_Type;
Item : in Item_Type);
procedure Copy
(Target : in out Vector;
Source : in Vector);
private
type Vector_Node;
type Vector is access all Vector_Node;
Default_Size : constant Index_Type := 8 * 4096 / Item_Type'Size;
type Table is array (Index_Type range <>) of Item_Type;
type Vector_Node (Size : Index_Type) is record
Data : Table (1 .. Size);
Last : Index_Type'Base := 0;
Next : Vector;
end record;
end Gela.Containers.Vectors;
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, Maxim Reznik
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the Maxim Reznik, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This package provides implementation of string handling subprograms for
-- generic platform. Package has two implementations: for 32-bit and for
-- 64-bit platform.
------------------------------------------------------------------------------
package Matreshka.Internals.Strings.Handlers.Portable is
pragma Preelaborate;
type Portable_String_Handler is
new Abstract_String_Handler with null record;
overriding procedure Fill_Null_Terminator
(Self : Portable_String_Handler;
Item : not null Shared_String_Access);
overriding function Is_Equal
(Self : Portable_String_Handler;
Left : not null Shared_String_Access;
Right : not null Shared_String_Access) return Boolean;
overriding function Is_Less
(Self : Portable_String_Handler;
Left : not null Shared_String_Access;
Right : not null Shared_String_Access) return Boolean;
overriding function Is_Greater
(Self : Portable_String_Handler;
Left : not null Shared_String_Access;
Right : not null Shared_String_Access) return Boolean;
overriding function Is_Less_Or_Equal
(Self : Portable_String_Handler;
Left : not null Shared_String_Access;
Right : not null Shared_String_Access) return Boolean;
overriding function Is_Greater_Or_Equal
(Self : Portable_String_Handler;
Left : not null Shared_String_Access;
Right : not null Shared_String_Access) return Boolean;
Handler : aliased Portable_String_Handler;
end Matreshka.Internals.Strings.Handlers.Portable;
|
with AVR.USART;
procedure Main is
Out_Flag_Char : Character;
begin
AVR.USART.Initialize
(In_Port => AVR.USART.USART1,
In_Setup =>
(Sync_Mode => AVR.USART.ASYNCHRONOUS,
Double_Speed => True,
Baud_Rate => 9600,
Data_Bits => AVR.USART.BITS_8,
Parity => AVR.USART.NONE,
Stop_Bits => 1,
Model => AVR.USART.POLLING));
AVR.USART.Write_Line
(In_Port => AVR.USART.USART1,
In_Data => "#### Initialization ok. ####");
loop
AVR.USART.Receive_Char_Polled
(In_Port => AVR.USART.USART1,
Out_Data => Out_Flag_Char);
AVR.USART.Write_Char
(In_Port => AVR.USART.USART1,
In_Data => Out_Flag_Char);
end loop;
end Main;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of STMicroelectronics nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
-- --
with RP.Device; use RP.Device;
with RP.GPIO; use RP.GPIO;
package RP.Board is
end RP.Board;
|
with Ada.Text_IO;
package body Problem_67 is
package IO renames Ada.Text_IO;
procedure Solve is
begin
IO.Put_Line("The Answer");
end Solve;
end Problem_67;
|
-- SPDX-FileCopyrightText: 2020-2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Element_Vectors;
with Program.Element_Visitors;
with Program.Elements.Discriminant_Associations;
with Program.Elements.Expressions;
with Program.Elements.Identifiers;
with Program.Elements.Parameter_Associations;
with Program.Elements.Record_Component_Associations;
with Program.Lexical_Elements;
package Program.Nodes.Proxy_Associations is
pragma Preelaborate;
type Proxy_Association is new Program.Nodes.Node
and Program.Elements.Parameter_Associations.Parameter_Association
and Program.Elements.Parameter_Associations.Parameter_Association_Text
and Program.Elements.Record_Component_Associations
.Record_Component_Association
and Program.Elements.Record_Component_Associations
.Record_Component_Association_Text
and Program.Elements.Discriminant_Associations
.Discriminant_Association
and Program.Elements.Discriminant_Associations
.Discriminant_Association_Text
with private;
-- Internal common representation of
-- * Parameter_Association
-- * Record_Component_Association
-- * Discriminant_Association
function Create
(Choices : Program.Element_Vectors.Element_Vector_Access;
Arrow_Token : Program.Lexical_Elements.Lexical_Element_Access;
Expression : Program.Elements.Expressions.Expression_Access;
Box_Token : Program.Lexical_Elements.Lexical_Element_Access)
return Proxy_Association;
type Proxy_Association_Access is access all Proxy_Association;
procedure Turn_To_Parameter (Self : in out Proxy_Association'Class);
procedure Turn_To_Discrete_Range (Self : in out Proxy_Association'Class);
procedure Turn_To_Discriminant_Association
(Self : in out Proxy_Association'Class);
private
type Identifier_Vector (Parent : not null Proxy_Association_Access) is new
Program.Elements.Identifiers.Identifier_Vector
with null record;
overriding function Get_Length (Self : Identifier_Vector) return Positive;
overriding function Delimiter
(Self : Identifier_Vector;
Index : Positive) return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Element
(Self : Identifier_Vector;
Index : Positive) return not null Program.Elements.Element_Access;
type Kind is
(A_Parameter_Association,
A_Record_Component_Association,
A_Discriminant_Association,
A_Discrete_Simple_Expression_Range);
type Proxy_Association is new Program.Nodes.Node
and Program.Elements.Parameter_Associations.Parameter_Association
and Program.Elements.Record_Component_Associations
.Record_Component_Association
and Program.Elements.Parameter_Associations.Parameter_Association_Text
and Program.Elements.Record_Component_Associations
.Record_Component_Association_Text
and Program.Elements.Discriminant_Associations
.Discriminant_Association
and Program.Elements.Discriminant_Associations
.Discriminant_Association_Text
with record
This : Proxy_Association_Access :=
Proxy_Association'Unchecked_Access;
-- to get r/w access from constant Self parameter
Current : Kind;
Choices : Program.Element_Vectors.Element_Vector_Access;
Expression : Program.Elements.Expressions.Expression_Access;
Arrow_Token : Program.Lexical_Elements.Lexical_Element_Access;
Box_Token : Program.Lexical_Elements.Lexical_Element_Access;
Selectors : aliased Identifier_Vector
(Proxy_Association'Unchecked_Access);
end record;
overriding procedure Visit
(Self : not null access Proxy_Association;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Choices (Self : Proxy_Association)
return Program.Element_Vectors.Element_Vector_Access;
overriding function Component_Value (Self : Proxy_Association)
return Program.Elements.Expressions.Expression_Access;
overriding function Is_Record_Component_Association
(Self : Proxy_Association) return Boolean;
overriding function Is_Association (Self : Proxy_Association)
return Boolean;
overriding function Formal_Parameter (Self : Proxy_Association)
return Program.Elements.Expressions.Expression_Access;
overriding function Actual_Parameter (Self : Proxy_Association)
return not null Program.Elements.Expressions.Expression_Access;
overriding function Is_Parameter_Association (Self : Proxy_Association)
return Boolean;
overriding function To_Record_Component_Association_Text
(Self : in out Proxy_Association)
return Program.Elements.Record_Component_Associations
.Record_Component_Association_Text_Access;
overriding function Arrow_Token (Self : Proxy_Association)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Box_Token (Self : Proxy_Association)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function To_Parameter_Association_Text
(Self : in out Proxy_Association)
return Program.Elements.Parameter_Associations
.Parameter_Association_Text_Access;
-- Discriminant association
overriding function Is_Discriminant_Association
(Self : Proxy_Association) return Boolean;
overriding function Selector_Names
(Self : Proxy_Association)
return Program.Elements.Identifiers.Identifier_Vector_Access;
overriding function Discriminant_Value
(Self : Proxy_Association)
return not null Program.Elements.Expressions.Expression_Access;
overriding function To_Discriminant_Association_Text
(Self : in out Proxy_Association)
return Program.Elements.Discriminant_Associations
.Discriminant_Association_Text_Access;
-- Discrete Simple_Expression_Range
overriding function Is_Definition (Self : Proxy_Association) return Boolean;
overriding function Is_Discrete_Range
(Self : Proxy_Association) return Boolean;
overriding function Is_Discrete_Simple_Expression_Range
(Self : Proxy_Association) return Boolean;
end Program.Nodes.Proxy_Associations;
|
------------------------------------------------------------------------------
-- G E L A A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of this file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $:
package body Asis.Gela is
Current_Hash : Asis.ASIS_Positive := 1;
---------------
-- Next_Hash --
---------------
function Next_Hash return Asis.ASIS_Integer is
begin
Current_Hash := Current_Hash + 1;
return Current_Hash;
end Next_Hash;
end Asis.Gela;
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, Maxim Reznik
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the Maxim Reznik, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Source_Buffers;
with Program.Symbols;
private with Ada.Containers.Vectors;
package Program.Plain_Lexical_Elements is
pragma Preelaborate;
type Lexical_Element (<>) is new Program.Lexical_Elements.Lexical_Element
with private;
function Symbol (Self : Lexical_Element'Class)
return Program.Symbols.Symbol;
type Line_Buffer is limited interface;
not overriding function Text
(Self : Line_Buffer;
Span : Program.Source_Buffers.Span) return Program.Text is abstract;
not overriding procedure Get_Span
(Self : Line_Buffer;
Span : Program.Source_Buffers.Span;
From_Line : out Positive;
To_Line : out Positive;
From_Column : out Positive;
To_Column : out Positive) is abstract;
type Line_Buffer_Access is access all Line_Buffer'Class
with Storage_Size => 0;
type Lexical_Element_Vector (Buffer : not null Line_Buffer_Access)
is limited
new Program.Lexical_Elements.Lexical_Element_Vector with private;
not overriding procedure Append
(Self : aliased in out Lexical_Element_Vector;
Span : Program.Source_Buffers.Span;
Kind : Program.Lexical_Elements.Lexical_Element_Kind;
Symbol : Program.Symbols.Symbol);
private
type Lexical_Element_Vector_Access is access all Lexical_Element_Vector
with Storage_Size => 0;
type Lexical_Element
(Vector : Lexical_Element_Vector_Access)
is new Program.Lexical_Elements.Lexical_Element with
record
Span : Program.Source_Buffers.Span;
Kind : Program.Lexical_Elements.Lexical_Element_Kind;
Symbol : Program.Symbols.Symbol;
end record;
overriding function Image (Self : Lexical_Element) return Program.Text;
overriding function Kind (Self : Lexical_Element)
return Program.Lexical_Elements.Lexical_Element_Kind;
overriding function From
(Self : Lexical_Element) return Program.Lexical_Elements.Location;
package Vectors is new Ada.Containers.Vectors
(Index_Type => Positive,
Element_Type => Program.Lexical_Elements.Lexical_Element_Access,
"=" => Program.Lexical_Elements."=");
type Lexical_Element_Vector (Buffer : not null Line_Buffer_Access) is
limited new Program.Lexical_Elements.Lexical_Element_Vector with
record
Vector : Vectors.Vector;
end record;
overriding function First_Index (Self : Lexical_Element_Vector)
return Positive is (1);
overriding function Last_Index (Self : Lexical_Element_Vector)
return Positive;
overriding function Element
(Self : Lexical_Element_Vector;
Index : Positive)
return not null Program.Lexical_Elements.Lexical_Element_Access;
end Program.Plain_Lexical_Elements;
|
with TEXT_IO;
with STRINGS_PACKAGE; use STRINGS_PACKAGE;
with WORD_PARAMETERS; use WORD_PARAMETERS;
with INFLECTIONS_PACKAGE; use INFLECTIONS_PACKAGE;
with DICTIONARY_PACKAGE; use DICTIONARY_PACKAGE;
with UNIQUES_PACKAGE; use UNIQUES_PACKAGE;
with DEVELOPER_PARAMETERS; use DEVELOPER_PARAMETERS;
with WORD_SUPPORT_PACKAGE; use WORD_SUPPORT_PACKAGE;
procedure LIST_SWEEP(PA : in out PARSE_ARRAY; PA_LAST : in out INTEGER) is
-- This procedure is supposed to process the output PARSE_ARRAY at PA level
-- before it get turned into SIRAA and DMNPCA in LIST_PACKAGE
-- Since it does only PARSE_ARRAY it is just cheaking INFLECTIONS, not DICTIOARY
use INFLECTION_RECORD_IO;
use DICT_IO;
PR, OPR : PARSE_RECORD := NULL_PARSE_RECORD;
DE : DICTIONARY_ENTRY := NULL_DICTIONARY_ENTRY;
I, J, JJ : INTEGER := 0;
DIFF_J : INTEGER := 0;
NOT_ONLY_ARCHAIC : BOOLEAN := FALSE;
NOT_ONLY_MEDIEVAL : BOOLEAN := FALSE;
NOT_ONLY_UNCOMMON : BOOLEAN := FALSE;
function ALLOWED_STEM(PR : PARSE_RECORD) return BOOLEAN is
ALLOWED : BOOLEAN := TRUE; -- modify as necessary and return it
--DE : DICTIONARY_ENTRY;
begin
--TEXT_IO.PUT("ALLOWED? >"); PARSE_RECORD_IO.PUT(PR); TEXT_IO.NEW_LINE;
if PR.D_K not in GENERAL..LOCAL then
return TRUE; end if;
--DICT_IO.SET_INDEX(DICT_FILE(PR.D_K), PR.MNPC);
--DICT_IO.READ(DICT_FILE(PR.D_K), DE);
DICT_IO.READ(DICT_FILE(PR.D_K), DE, PR.MNPC);
--TEXT_IO.PUT("ALLOWED? >"); DICTIONARY_ENTRY_IO.PUT(DE); TEXT_IO.NEW_LINE;
-- if PR.D_K in GENERAL..UNIQUE then
-- if (DE.TRAN.AGE = X) or else (DE.TRAN.AGE > A) then
-- NOT_ONLY_ARCHAIC_STEM := TRUE;
-- end if;
-- if DE.TRAN.AGE < F then -- Or E????
-- NOT_ONLY_MEDIEVAL_STEM := TRUE;
-- end if;
-- if DE.TRAN.FREQ < E then -- -- E for DICTLINE is uncommon !!!!
-- NOT_ONLY_UNCOMMON_STEM := TRUE;
-- end if;
-- end if;
-- NOUN CHECKS
case PR.IR.QUAL.POFS is
when N =>
if WORDS_MDEV(FOR_WORD_LIST_CHECK) then
if (NOM <= PR.IR.QUAL.N.CS) and then
(S <= PR.IR.QUAL.N.NUMBER) then
ALLOWED := TRUE;
elsif (NOM <= PR.IR.QUAL.N.CS) and then
(PR.IR.QUAL.N.NUMBER = P) then
SEARCH_FOR_PL:
declare
DE : DICTIONARY_ENTRY;
MEAN : MEANING_TYPE := NULL_MEANING_TYPE;
begin
ALLOWED := FALSE;
DICT_IO.READ(DICT_FILE(PR.D_K), DE, PR.MNPC);
MEAN := DE.MEAN;
for J in MEANING_TYPE'FIRST..MEANING_TYPE'LAST-2 loop
if MEAN(J..J+2) = "pl." then
ALLOWED := TRUE;
exit;
end if;
end loop;
end SEARCH_FOR_PL;
--====================================
else
ALLOWED := FALSE;
end if;
end if;
when ADJ =>
if WORDS_MDEV(FOR_WORD_LIST_CHECK) then
if (NOM <= PR.IR.QUAL.ADJ.CS) and then
(S <= PR.IR.QUAL.ADJ.NUMBER) and then
(M <= PR.IR.QUAL.ADJ.GENDER) then
ALLOWED := TRUE;
else
ALLOWED := FALSE;
end if;
end if;
-- VERB CHECKS
when V =>
--TEXT_IO.PUT("VERB ");
-- Check for Verb 3 1 dic/duc/fac/fer shortened imperative
-- See G&L 130.5
declare
STEM : constant STRING := TRIM(PR.STEM);
LAST_THREE : STRING(1..3);
begin
if (PR.IR.QUAL.V = ((3, 1), (PRES, ACTIVE, IMP), 2, S)) and
(PR.IR.ENDING.SIZE = 0) then -- For this special case
if STEM'LENGTH >= 3 then
LAST_THREE := STEM(STEM'LAST-2..STEM'LAST);
if (LAST_THREE = "dic") or
(LAST_THREE = "duc") or
(LAST_THREE = "fac") or
(LAST_THREE = "fer") then
null;
else
ALLOWED := FALSE;
end if;
else
ALLOWED := FALSE;
end if;
end if;
end;
-- Check for Verb Imperative being in permitted person
if (PR.IR.QUAL.V.TENSE_VOICE_MOOD.MOOD = IMP) then
if (PR.IR.QUAL.V.TENSE_VOICE_MOOD.TENSE = PRES) and
(PR.IR.QUAL.V.PERSON = 2) then
null;
elsif (PR.IR.QUAL.V.TENSE_VOICE_MOOD.TENSE = FUT) and
(PR.IR.QUAL.V.PERSON = 2 or PR.IR.QUAL.V.PERSON = 3) then
null;
else
--PUT("IMP not in permitted person "); PUT(PR.IR); NEW_LINE;
ALLOWED := FALSE;
end if;
end if;
-- Check for V IMPERS and demand that only 3rd person -- ???????
if (DE.PART.V.KIND = IMPERS) then
if (PR.IR.QUAL.V.PERSON = 3) then
null;
else
--PUT("IMPERS not in 3rd person "); PUT(PR.IR); NEW_LINE;
ALLOWED := FALSE;
end if;
end if;
-- Check for V DEP and demand PASSIVE
if (DE.PART.V.KIND = DEP) then
--TEXT_IO.PUT("DEP ");
if (PR.IR.QUAL.V.TENSE_VOICE_MOOD.VOICE = ACTIVE) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD.MOOD = INF) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD.TENSE = FUT) then
--TEXT_IO.PUT("PASSIVE ");
--TEXT_IO.PUT("DEP FUT INF not in ACTIVE "); PUT(PR.IR); TEXT_IO.NEW_LINE;
ALLOWED := TRUE;
elsif (PR.IR.QUAL.V.TENSE_VOICE_MOOD.VOICE = ACTIVE) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD.MOOD in IND..INF) then
--TEXT_IO.PUT("ACTIVE ");
--TEXT_IO.PUT("DEP not in PASSIVE NOT ALLOWED "); PUT(PR.IR); TEXT_IO.NEW_LINE;
ALLOWED := FALSE;
else
--TEXT_IO.PUT("?????? ");
null;
end if;
end if;
-- Check for V SEMIDEP and demand PASSIVE ex Perf
if (DE.PART.V.KIND = SEMIDEP) then
if (PR.IR.QUAL.V.TENSE_VOICE_MOOD.VOICE = PASSIVE) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD.TENSE in PRES..FUT) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD.MOOD in IND..IMP) then
--PUT("SEMIDEP Pres not in ACTIVE "); PUT(PR.IR); NEW_LINE;
ALLOWED := FALSE;
elsif (PR.IR.QUAL.V.TENSE_VOICE_MOOD.VOICE = ACTIVE) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD.TENSE in PERF..FUTP ) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD.MOOD in IND..IMP) then
--PUT("SEMIDEP Perf not in PASSIVE "); PUT(PR.IR); NEW_LINE;
ALLOWED := FALSE;
else
null;
end if;
end if;
if WORDS_MDEV(FOR_WORD_LIST_CHECK) then
if (PR.IR.QUAL.V.PERSON = 1) and then
(PR.IR.QUAL.V.NUMBER = S) then
if ((DE.PART.V.KIND in X..INTRANS) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD = (PRES, ACTIVE, IND))) or else
((DE.PART.V.KIND = DEP) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD = (PRES, PASSIVE, IND))) or else
((DE.PART.V.KIND = SEMIDEP) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD = (PRES, ACTIVE, IND))) then
ALLOWED := TRUE;
elsif ((DE.PART.V.KIND = PERFDEF) and
(PR.IR.QUAL.V.TENSE_VOICE_MOOD = (PERF, ACTIVE, IND))) then
ALLOWED := TRUE;
else
ALLOWED := FALSE;
end if;
elsif (DE.PART.V.KIND = IMPERS) then
if (PR.IR.QUAL.V.PERSON = 3) and then
(PR.IR.QUAL.V.NUMBER = S) and then
(PR.IR.QUAL.V.TENSE_VOICE_MOOD = (PRES, ACTIVE, IND)) then
ALLOWED := TRUE;
else
ALLOWED := FALSE;
end if;
else
ALLOWED := FALSE;
end if;
end if;
when others =>
null;
end case;
if WORDS_MDEV(FOR_WORD_LIST_CHECK) then -- Non parts
if (PR.IR.QUAL.POFS in VPAR..SUPINE) then
ALLOWED := FALSE;
end if;
end if; -- Non parts
--TEXT_IO.PUT_LINE("Returning FOR ALLOWED " & BOOLEAN'IMAGE(ALLOWED));
return ALLOWED;
end ALLOWED_STEM;
-----------------------------------------------------------
procedure ORDER_PARSE_ARRAY(SL: in out PARSE_ARRAY; DIFF_J : out INTEGER) is
use INFLECTION_RECORD_IO;
use DICT_IO;
HITS : INTEGER := 0;
SL_FIRST : INTEGER := SL'FIRST;
SL_LAST : INTEGER := SL'LAST;
SL_LAST_INITIAL : INTEGER := SL_LAST;
SM : PARSE_RECORD;
--DE, ODE : DICTIONARY_ENTRY;
ROMAN_NUMBER : BOOLEAN := FALSE;
HAS_NOUN_ABBREVIATION : BOOLEAN := FALSE;
-- HAS_ADJECTIVE_ABBREVIATION : BOOLEAN := FALSE;
-- HAS_VERB_ABBREVIATION : BOOLEAN := FALSE;
NOT_ONLY_VOCATIVE : BOOLEAN := FALSE;
NOT_ONLY_LOCATIVE : BOOLEAN := FALSE;
J : INTEGER := SL'FIRST;
function DEPR (PR : PARSE_RECORD) return DICTIONARY_ENTRY is
DE : DICTIONARY_ENTRY;
begin
--TEXT_IO.PUT("DEPR "); PARSE_RECORD_IO.PUT(PR); TEXT_IO.NEW_LINE;
if PR.MNPC = NULL_MNPC then
return NULL_DICTIONARY_ENTRY;
else
if PR.D_K in GENERAL..LOCAL then
--if PR.MNPC /= OMNPC then
DICT_IO.SET_INDEX(DICT_FILE(PR.D_K), PR.MNPC);
DICT_IO.READ(DICT_FILE(PR.D_K), DE);
--OMNPC := PR.MNPC;
--ODE := DE;
--else
--DE := ODE;
--end if;
elsif PR.D_K = UNIQUE then
DE := UNIQUES_DE(PR.MNPC);
end if;
end if;
-- DICT_IO.SET_INDEX(DICT_FILE(PR.D_K), PR.MNPC);
-- DICT_IO.READ(DICT_FILE(PR.D_K), DE);
--TEXT_IO.PUT_LINE("Returning from DEPR MNPC = " & INTEGER'IMAGE(INTEGER(PR.MNPC)) & " ");
--DICTIONARY_ENTRY_IO.PUT(DE); TEXT_IO.NEW_LINE;
return DE;
end DEPR;
begin
if SL'LENGTH = 0 then
return;
end if;
-- Bubble sort since this list should usually be very small (1-5)
HIT_LOOP:
loop
HITS := 0;
--------------------------------------------------
SWITCH:
declare
function "<" (LEFT, RIGHT : QUALITY_RECORD) return BOOLEAN is
begin
if LEFT.POFS = RIGHT.POFS and then
LEFT.POFS = PRON and then
LEFT.PRON.DECL.WHICH = 1 then
return (LEFT.PRON.DECL.VAR < RIGHT.PRON.DECL.VAR);
else
return INFLECTIONS_PACKAGE."<"(LEFT, RIGHT);
end if;
end "<";
function EQU (LEFT, RIGHT : QUALITY_RECORD) return BOOLEAN is
begin
if LEFT.POFS = RIGHT.POFS and then
LEFT.POFS = PRON and then
LEFT.PRON.DECL.WHICH = 1 then
return (LEFT.PRON.DECL.VAR = RIGHT.PRON.DECL.VAR);
else
return INFLECTIONS_PACKAGE."="(LEFT, RIGHT);
end if;
end EQU;
function MEANING (PR : PARSE_RECORD) return MEANING_TYPE is
begin
return DEPR(PR).MEAN;
end MEANING;
begin
-- Need to remove duplicates in ARRAY_STEMS
-- This sort is very sloppy
-- One problem is that it can mix up some of the order of PREFIX, XXX, LOC
-- I ought to do this for every set of results from different approaches
-- not just in one fell swoop at the end !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
INNER_LOOP:
for I in SL'FIRST..SL_LAST-1 loop
-- Maybe < = on PR.STEM - will have to make up "<" -- Actually STEM and PART -- and check that later in print
if SL(I+1).D_K > SL(I).D_K or else -- Let DICT.LOC list first
(SL(I+1).D_K = SL(I).D_K and then
SL(I+1).MNPC < SL(I).MNPC) or else
(SL(I+1).D_K = SL(I).D_K and then
SL(I+1).MNPC = SL(I).MNPC and then
SL(I+1).IR.QUAL < SL(I).IR.QUAL) or else
(SL(I+1).D_K = SL(I).D_K and then
SL(I+1).MNPC = SL(I).MNPC and then
EQU(SL(I+1).IR.QUAL, SL(I).IR.QUAL) and then
MEANING(SL(I+1)) < MEANING(SL(I))) or else -- | is > letter
(SL(I+1).D_K = SL(I).D_K and then
SL(I+1).MNPC = SL(I).MNPC and then
EQU(SL(I+1).IR.QUAL, SL(I).IR.QUAL) and then
MEANING(SL(I+1)) = MEANING(SL(I)) and then
SL(I+1).IR.ENDING.SIZE < SL(I).IR.ENDING.SIZE) or else
(SL(I+1).D_K = SL(I).D_K and then
SL(I+1).MNPC = SL(I).MNPC and then
EQU(SL(I+1).IR.QUAL, SL(I).IR.QUAL) and then
MEANING(SL(I+1)) = MEANING(SL(I)) and then
SL(I+1).IR.ENDING.SIZE = SL(I).IR.ENDING.SIZE and then
INFLECTIONS_PACKAGE."<"(SL(I+1).IR.QUAL, SL(I).IR.QUAL))
then
SM := SL(I);
SL(I) := SL(I+1);
SL(I+1) := SM;
HITS := HITS + 1;
end if;
end loop INNER_LOOP;
end SWITCH;
--------------------------------------------------
exit when HITS = 0;
end loop HIT_LOOP;
-- Fix up the Archaic/Medieval
if WORDS_MODE(TRIM_OUTPUT) then
-- Remove those inflections if MDEV and there is other valid
-- TEXT_IO.PUT_LINE("SCANNING FOR TRIM SL'FIRST = " & INTEGER'IMAGE(SL'FIRST) & " SL'LAST = " & INTEGER'IMAGE(SL'LAST) );
-- for I in SL'FIRST..SL_LAST loop
-- PARSE_RECORD_IO.PUT(SL(I)); TEXT_IO.NEW_LINE;
-- end loop;
-- Check to see if we can afford to TRIM, if there will be something left over
for I in SL'FIRST..SL_LAST loop
--TEXT_IO.PUT_LINE("SCANNING FOR TRIM I = " & INTEGER'IMAGE(I) & " INFL AGE = " & AGE_TYPE'IMAGE(SL(I).IR.AGE));
if SL(I).D_K in GENERAL..LOCAL then
DICT_IO.SET_INDEX(DICT_FILE(SL(I).D_K), SL(I).MNPC);
--TEXT_IO.PUT(INTEGER'IMAGE(INTEGER(SL(I).MNPC)));
DICT_IO.READ(DICT_FILE(SL(I).D_K), DE);
--DICTIONARY_ENTRY_IO.PUT(DE); TEXT_IO.NEW_LINE;
if ((SL(I).IR.AGE = X) or else (SL(I).IR.AGE > A)) and
((DE.TRAN.AGE = X) or else (DE.TRAN.AGE > A)) then
NOT_ONLY_ARCHAIC := TRUE;
end if;
if ((SL(I).IR.AGE = X) or else (SL(I).IR.AGE < F)) and -- Or E????
((DE.TRAN.AGE = X) or else (DE.TRAN.AGE < F)) then -- Or E????
NOT_ONLY_MEDIEVAL := TRUE;
end if;
if ((SL(I).IR.FREQ = X) or else (SL(I).IR.FREQ < C)) and -- A/X < C -- C for inflections is uncommon !!!!
((DE.TRAN.FREQ = X) or else (DE.TRAN.FREQ < D)) then -- -- E for DICTLINE is uncommon !!!!
NOT_ONLY_UNCOMMON := TRUE;
end if;
-- TEXT_IO.PUT_LINE("NOT_ONLY_ARCHAIC = " & BOOLEAN'IMAGE(NOT_ONLY_ARCHAIC));
-- TEXT_IO.PUT_LINE("NOT_ONLY_MEDIEVAL = " & BOOLEAN'IMAGE(NOT_ONLY_MEDIEVAL));
-- TEXT_IO.PUT_LINE("NOT_ONLY_UNCOMMON = " & BOOLEAN'IMAGE(NOT_ONLY_UNCOMMON));
-- if ((SL(I).IR.QUAL.POFS = N) and then (SL(I).IR.QUAL.N.CS /= VOC)) or
-- ((SL(I).IR.QUAL.POFS = ADJ) and then (SL(I).IR.QUAL.ADJ.CS /= VOC)) or
-- ((SL(I).IR.QUAL.POFS = VPAR) and then (SL(I).IR.QUAL.VPAR.CS /= VOC)) then
-- NOT_ONLY_VOCATIVE := TRUE;
-- end if;
-- if (SL(I).IR.QUAL.POFS = N) and then (SL(I).IR.QUAL.N.CS /= LOC) then
-- NOT_ONLY_LOCATIVE := TRUE;
-- end if;
-- if (SL(I).IR.QUAL.POFS = ADJ) and then (SL(I).IR.QUAL.ADJ.CS /= VOC) then
-- NOT_ONLY_VOCATIVE := TRUE;
-- end if;
-- if (SL(I).IR.QUAL.POFS = ADJ) and then (SL(I).IR.QUAL.ADJ.CS /= LOC) then
-- NOT_ONLY_LOCATIVE := TRUE;
-- end if;
-- if (SL(I).IR.QUAL.POFS = VPAR) and then (SL(I).IR.QUAL.VPAR.CS /= VOC) then
-- NOT_ONLY_VOCATIVE := TRUE;
-- end if;
-- if (SL(I).IR.QUAL.POFS = VPAR) and then (SL(I).IR.QUAL.VPAR.CS /= LOC) then
-- NOT_ONLY_LOCATIVE := TRUE;
-- end if;
-- TEXT_IO.PUT_LINE("NOT_ONLY_VOCATIVE = " & BOOLEAN'IMAGE(NOT_ONLY_VOCATIVE));
-- TEXT_IO.PUT_LINE("NOT_ONLY_LOCATIVE = " & BOOLEAN'IMAGE(NOT_ONLY_LOCATIVE));
if SL(I).IR.QUAL.POFS = N and then
SL(I).IR.QUAL.N.DECL = (9, 8) then
HAS_NOUN_ABBREVIATION := TRUE;
--TEXT_IO.PUT_LINE("Has noun abbreviation I = " & INTEGER'IMAGE(I));
-- elsif SL(I).IR.QUAL.POFS = ADJ and then
-- SL(I).IR.QUAL.ADJ.DECL = (9, 8) then
-- HAS_ADJECTIVE_ABBREVIATION := TRUE;
-- elsif SL(I).IR.QUAL.POFS = V and then
-- SL(I).IR.QUAL.V.CON = (9, 8) then
-- HAS_VERB_ABBREVIATION := TRUE;
end if;
end if;
end loop;
-- We order and trim within a subset SL, but have to correct the big set PA also
-- Kill not ALLOWED first, then check the remaining from the top
-- I am assuming there is no trimming of FIXES for AGE/...
I := SL_LAST;
while I >= SL'FIRST loop
if (not ALLOWED_STEM(SL(I)) or -- Remove not ALLOWED_STEM & null
(PA(I) = NULL_PARSE_RECORD)) then
--TEXT_IO.PUT_LINE("Not ALLOWED SL_LAST = " & INTEGER'IMAGE(SL_LAST) & " J = " & INTEGER'IMAGE(I));
SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
SL_LAST := SL_LAST - 1;
TRIMMED := TRUE;
--TEXT_IO.PUT_LINE("Not ALLOWED end SL_LAST = " & INTEGER'IMAGE(SL_LAST) & " J = " & INTEGER'IMAGE(I));
end if;
I := I - 1;
end loop;
I := SL_LAST;
while I >= SL'FIRST loop
--TEXT_IO.PUT_LINE("TRIMMING FOR TRIM I = " & INTEGER'IMAGE(I));
if (NOT_ONLY_ARCHAIC and WORDS_MDEV(OMIT_ARCHAIC)) and then
SL(I).IR.AGE = A then
SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
SL_LAST := SL_LAST - 1;
--TEXT_IO.PUT_LINE("Archaic SL_LAST = " & INTEGER'IMAGE(SL_LAST) & " I = " & INTEGER'IMAGE(I));
TRIMMED := TRUE;
elsif (NOT_ONLY_MEDIEVAL and WORDS_MDEV(OMIT_MEDIEVAL)) and then
SL(I).IR.AGE >= F then
SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
SL_LAST := SL_LAST - 1;
--TEXT_IO.PUT_LINE("Medieval SL_LAST = " & INTEGER'IMAGE(SL_LAST) & " I = " & INTEGER'IMAGE(I));
TRIMMED := TRUE;
end if;
I := I - 1;
end loop;
I := SL_LAST;
while I >= SL'FIRST loop
if (NOT_ONLY_UNCOMMON and WORDS_MDEV(OMIT_UNCOMMON)) and then
SL(I).IR.FREQ >= C then -- Remember A < C
SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
SL_LAST := SL_LAST - 1;
--TEXT_IO.PUT_LINE("Uncommon SL_LAST = " & INTEGER'IMAGE(SL_LAST) & " I = " & INTEGER'IMAGE(I));
TRIMMED := TRUE;
end if;
I := I - 1;
end loop;
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----Big problem. This area has been generaing exceptions.
----At least one difficulty is that suffixes change POFS.
----So one has a N inflection (SL) but a V DE
----When the program checks for VOC, it wants a N
---- and then asks about KIND (P, N, T,...)
---- But the DE (v) does not have those
---- The solution would be to fix ADD SUFFIX to do somethnig about passing the ADDON KIND
---- I do not want to face that now
---- It is likely that all this VOC/LOC is worthless anyway. Maybe lower FREQ in INFLECTS
----
---- A further complication is the GANT and AO give different results (AO no exception)
---- That is probably because the program is in error and the result threrfore unspecified
----
----
--
-- I := SL_LAST;
--TEXT_IO.PUT_LINE("Checking VOC/LOC SL_LAST = " & INTEGER'IMAGE(SL_LAST));
-- while I >= SL'FIRST loop
-- -- Check for Vocative being person/name and Locative a place/area
----TEXT_IO.PUT_LINE("Looping down on I I = " & INTEGER'IMAGE(I));
-- if (SL(I).IR.QUAL.POFS = N) then
--TEXT_IO.PUT_LINE("N found I = " & INTEGER'IMAGE(I));
--PARSE_RECORD_IO.PUT(SL(I)); TEXT_IO.NEW_LINE;
-- if NOT_ONLY_VOCATIVE and then
-- (SL(I).IR.QUAL.N.CS = VOC) and then
-- ((DEPR(SL(I)).PART.N.KIND /= N) and
-- (DEPR(SL(I)).PART.N.KIND /= P)) then
----TEXT_IO.PUT_LINE("N VOC not a P or N I = " & INTEGER'IMAGE(I));
-- SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
-- SL_LAST := SL_LAST - 1;
-- TRIMMED := TRUE;
-- elsif NOT_ONLY_LOCATIVE and then
-- (SL(I).IR.QUAL.N.CS = LOC) and then
-- ((DEPR(SL(I)).PART.N.KIND /= L) and
-- (DEPR(SL(I)).PART.N.KIND /= W)) then
----TEXT_IO.PUT_LINE("N LOC not a W or L ");
-- SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
-- SL_LAST := SL_LAST - 1;
-- TRIMMED := TRUE;
-- end if;
-- end if;
-- I := I - 1;
-- end loop;
----TEXT_IO.PUT_LINE("Checked VOC/LOC");
--
--
-- -- Cutting viciously here
-- I := SL_LAST;
-- while I >= SL'FIRST loop
-- if (SL(I).IR.QUAL.POFS = ADJ) then
-- if NOT_ONLY_VOCATIVE and then
-- (SL(I).IR.QUAL.ADJ.CS = VOC) then
-- SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
-- SL_LAST := SL_LAST - 1;
-- TRIMMED := TRUE;
-- elsif NOT_ONLY_LOCATIVE and then
-- (SL(I).IR.QUAL.ADJ.CS = LOC) then
-- SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
-- SL_LAST := SL_LAST - 1;
-- TRIMMED := TRUE;
-- end if;
-- end if;
-- I := I - 1;
-- end loop;
--
--
--
-- I := SL_LAST;
-- while I >= SL'FIRST loop
-- if (SL(I).IR.QUAL.POFS = VPAR) then
-- if NOT_ONLY_VOCATIVE and then
-- (SL(I).IR.QUAL.VPAR.CS = VOC) then
-- SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
-- SL_LAST := SL_LAST - 1;
-- TRIMMED := TRUE;
-- elsif NOT_ONLY_LOCATIVE and then
-- (SL(I).IR.QUAL.VPAR.CS = LOC) then
-- SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
-- SL_LAST := SL_LAST - 1;
-- TRIMMED := TRUE;
-- end if;
-- end if;
-- I := I - 1;
-- end loop;
--
-- This is really working much too hard!
-- just to kill Roman numeral for three single letters
-- Also strange in that code depends on dictionary knowledge
I := SL_LAST;
while I >= SL'FIRST loop
if HAS_NOUN_ABBREVIATION and then
(ALL_CAPS and FOLLOWED_BY_PERIOD) then
if (SL(I).IR.QUAL.POFS /= N) or
( (SL(I).IR.QUAL /= (N, ((9, 8), X, X, M))) and
( TRIM(SL(I).STEM)'LENGTH = 1 and then
(SL(I).STEM(1) = 'A' or
SL(I).STEM(1) = 'C' or
SL(I).STEM(1) = 'D' or
--SL(I).STEM(1) = 'K' or -- No problem here
SL(I).STEM(1) = 'L' or
SL(I).STEM(1) = 'M' -- or
--SL(I).STEM(1) = 'N' or
--SL(I).STEM(1) = 'P' or
--SL(I).STEM(1) = 'Q' or
--SL(I).STEM(1) = 'T'
) ) ) then
SL(I..SL_LAST-1) := SL(I+1..SL_LAST);
SL_LAST := SL_LAST - 1;
TRIMMED := TRUE;
end if;
end if;
I := I - 1;
end loop;
end if; -- On TRIM
DIFF_J := SL_LAST_INITIAL - SL_LAST;
end ORDER_PARSE_ARRAY;
begin -- LIST_SWEEP
-- DICT_IO.READ(DICT_FILE(GENERAL), DE, 31585);
-- DICTIONARY_ENTRY_IO.PUT(DE); TEXT_IO.PUT_LINE("#########");
if PA'LENGTH = 0 then
return;
end if;
-- TEXT_IO.PUT_LINE("PA on entering LIST_SWEEP PA_LAST = " & INTEGER'IMAGE(PA_LAST));
-- for I in 1..PA_LAST loop
-- PARSE_RECORD_IO.PUT(PA(I)); TEXT_IO.NEW_LINE;
-- end loop;
RESET_PRONOUN_KIND:
declare
DE : DICTIONARY_ENTRY;
begin
for I in 1..PA_LAST loop
if PA(I).D_K = GENERAL then
DICT_IO.SET_INDEX(DICT_FILE(PA(I).D_K), PA(I).MNPC);
DICT_IO.READ(DICT_FILE(PA(I).D_K), DE);
if DE.PART.POFS = PRON and then
DE.PART.PRON.DECL.WHICH =1 then
PA(I).IR.QUAL.PRON.DECL.VAR := PRONOUN_KIND_TYPE'POS(DE.PART.PRON.KIND);
--elsif DE.PART.POFS = PACK and then
-- DE.PART.PACK.DECL.WHICH =1 then
-- PA(I).IR.QUAL.PACK.DECL.VAR := PRONOUN_KIND_TYPE'POS(DE.KIND.PRON_KIND);
end if;
end if;
end loop;
end RESET_PRONOUN_KIND;
---------------------------------------------------
-- NEED TO REMOVE DISALLOWED BEFORE DOING ANYTHING - BUT WITHOUT REORDERING
-- The problem I seem to have to face first, if not the first problem,
-- is the situation in which there are several sets of identical IRs with different MNPC
-- These may be variants with some other stem (e.g., K=3) not affecting the (K=1) word
-- Or they might be identical forms with different meanings (| additional meanings)
-- I need to group such common inflections - and pass this on somehow
-- TEXT_IO.PUT_LINE("PA before SWEEPING in LIST_SWEEP PA_LAST = " & INTEGER'IMAGE(PA_LAST));
-- for I in 1..PA_LAST loop
-- PARSE_RECORD_IO.PUT(PA(I)); TEXT_IO.NEW_LINE;
-- end loop;
SWEEPING:
-- To remove disallowed stems/inflections and resulting dangling fixes
declare
FIX_ON : BOOLEAN := FALSE;
PW_ON : BOOLEAN := FALSE;
P_FIRST : INTEGER := 1;
P_LAST : INTEGER := 0;
subtype XONS is PART_OF_SPEECH_TYPE range TACKON..SUFFIX;
begin
--
-- TEXT_IO.NEW_LINE;
-- TEXT_IO.PUT_LINE("SWEEPING ======================================");
-- TEXT_IO.NEW_LINE;
--TEXT_IO.PUT("{");
J := PA_LAST;
while J >= 1 loop -- Sweep backwards over PA
-- if (not ALLOWED_STEM(PA(J)) or -- Remove not ALLOWED_STEM & null
-- (PA(J) = NULL_PARSE_RECORD)) then -- and close ranks
-- TEXT_IO.PUT_LINE("Removing dis ALLOWED STEM J = " & INTEGER'IMAGE(J));
-- PA(J..PA_LAST-1) := PA(J+1..PA_LAST); -- null if J = PA_LAST
-- PA_LAST := PA_LAST - 1;
-- P_LAST := P_LAST - 1;
-- TRIMMED := TRUE;
if ((PA(J).D_K in ADDONS..YYY) or (PA(J).IR.QUAL.POFS in XONS)) and then
(PW_ON) then -- first FIX/TRICK after regular
FIX_ON := TRUE;
PW_ON := FALSE;
P_FIRST := J + 1;
--P_LAST := J + 1;
--TEXT_IO.PUT_LINE("SWEEP FIX/TRICK J = " & INTEGER'IMAGE(J) & " P_FIRST = " & INTEGER'IMAGE(P_FIRST) &
--" P_LAST = " & INTEGER'IMAGE(P_LAST));
JJ := J;
while PA(JJ+1).IR.QUAL.POFS = PA(JJ).IR.QUAL.POFS loop
P_LAST := JJ + 1;
end loop;
----Order internal to this set of inflections
-- TEXT_IO.PUT_LINE("SWEEP INTERNAL J = " & INTEGER'IMAGE(J) & " P_FIRST = " & INTEGER'IMAGE(P_FIRST) &
-- " P_LAST = " & INTEGER'IMAGE(P_LAST) & " DIFF_J = " & INTEGER'IMAGE(DIFF_J) & " PA_LAST = " & INTEGER'IMAGE(PA_LAST));
ORDER_PARSE_ARRAY(PA(P_FIRST..P_LAST), DIFF_J);
--PA(J..PA_LAST-1) := PA(J+1..PA_LAST);
PA(P_LAST-DIFF_J+1..PA_LAST-DIFF_J) := PA(P_LAST+1..PA_LAST);
PA_LAST := PA_LAST - DIFF_J;
-- TEXT_IO.PUT_LINE("SWEEP INTERNAL end J = " & INTEGER'IMAGE(J) & " P_FIRST = " & INTEGER'IMAGE(P_FIRST) &
-- " P_LAST = " & INTEGER'IMAGE(P_LAST) & " DIFF_J = " & INTEGER'IMAGE(DIFF_J) & " PA_LAST = " & INTEGER'IMAGE(PA_LAST));
P_FIRST := 1;
P_LAST := 0;
elsif ((PA(J).D_K in ADDONS..YYY) or (PA(J).IR.QUAL.POFS in XONS)) and then
(FIX_ON) then -- another FIX
--TEXT_IO.PUT_LINE("SWEEP Another FIX/TRICK J = " & INTEGER'IMAGE(J));
null;
elsif ((PA(J).D_K in ADDONS..YYY) or
(PA(J).IR.QUAL.POFS = X)) and then -- Kills TRICKS stuff
(not PW_ON) then
--TEXT_IO.PUT_LINE("Killing Tricks stuff J = " & INTEGER'IMAGE(J));
PA(P_LAST-DIFF_J+1..PA_LAST-DIFF_J) := PA(P_LAST+1..PA_LAST);
PA_LAST := PA_LAST - DIFF_J;
--PA_LAST := PA_LAST - 1;
P_LAST := P_LAST - 1;
else
--TEXT_IO.PUT_LINE("SWEEP else J = " & INTEGER'IMAGE(J) & " P_LAST = " & INTEGER'IMAGE(P_LAST));
--for I in 1..PA_LAST loop
--PARSE_RECORD_IO.PUT(PA(I)); TEXT_IO.NEW_LINE;
--end loop;
PW_ON := TRUE;
FIX_ON := FALSE;
if P_LAST <= 0 then
P_LAST := J;
end if;
if J = 1 then
--TEXT_IO.PUT_LINE("SWEEP J = 1 P_LAST = " & INTEGER'IMAGE(P_LAST));
ORDER_PARSE_ARRAY(PA(1..P_LAST), DIFF_J);
PA(P_LAST-DIFF_J+1..PA_LAST-DIFF_J) := PA(P_LAST+1..PA_LAST);
PA_LAST := PA_LAST - DIFF_J;
--TEXT_IO.PUT_LINE("SWEEP J = 1 end PA_LAST = " & INTEGER'IMAGE(PA_LAST) & " DIFF_J = " & INTEGER'IMAGE(DIFF_J));
end if;
end if; -- check PART
J := J - 1;
end loop; -- loop sweep over PA
end SWEEPING;
-- TEXT_IO.PUT_LINE("PA after SWEEPING in LIST_STEMS - before COMPRESS_LOOP PA_LAST = "
-- & INTEGER'IMAGE(PA_LAST));
-- for I in 1..PA_LAST loop
-- PARSE_RECORD_IO.PUT(PA(I)); TEXT_IO.NEW_LINE;
-- end loop;
OPR := PA(1);
-- Last chance to weed out duplicates
J := 2;
COMPRESS_LOOP:
loop
exit when J > PA_LAST;
PR := PA(J);
if PR /= OPR then
SUPRESS_KEY_CHECK:
declare
function "<=" (A, B : PARSE_RECORD) return BOOLEAN is
begin -- !!!!!!!!!!!!!!!!!!!!!!!!!!
if A.IR.QUAL = B.IR.QUAL and
A.MNPC = B.MNPC then
return TRUE;
else
return FALSE;
end if;
end "<=";
function "<" (A, B : PARSE_RECORD) return BOOLEAN is
begin -- !!!!!!!!!!!!!!!!!!!!!!!!!!
if A.IR.QUAL = B.IR.QUAL and
A.MNPC /= B.MNPC then
return TRUE;
else
return FALSE;
end if;
end "<";
begin
if ((PR.D_K /= XXX) and (PR.D_K /= YYY) and (PR.D_K /= PPP)) then
if PR <= OPR then -- Get rid of duplicates, if ORDER is OK
PA(J.. PA_LAST-1) := PA(J+1..PA_LAST); -- Shift PA down 1
PA_LAST := PA_LAST - 1; -- because found key duplicate
end if;
else
J := J + 1;
end if;
end SUPRESS_KEY_CHECK;
else
J := J + 1;
end if;
OPR := PR;
end loop COMPRESS_LOOP;
for I in 1..PA_LAST loop
-- Set to 0 the VAR for N -- DON'T
-- if PA(I).IR.QUAL.POFS = N then
-- PA(I).IR.QUAL.N.DECL.VAR := 0;
-- end if;
-- Destroy the artificial VAR for PRON 1 X
if PA(I).IR.QUAL.POFS = PRON and then
PA(I).IR.QUAL.PRON.DECL.WHICH =1 then
PA(I).IR.QUAL.PRON.DECL.VAR := 0;
end if;
if PA(I).IR.QUAL.POFS = V then
if PA(I).IR.QUAL.V.CON = (3, 4) then
-- Fix V 3 4 to be 4th conjugation
PA(I).IR.QUAL.V.CON := (4, 1);
-- else
-- -- Set to 0 other VAR for V
-- PA(I).IR.QUAL.V.CON.VAR := 0;
end if;
end if;
end loop;
-- TEXT_IO.PUT_LINE("PA after COMPRESS almost leaving LIST_STEMS PA_LAST = " & INTEGER'IMAGE(PA_LAST));
-- for I in 1..PA_LAST loop
-- PARSE_RECORD_IO.PUT(PA(I)); TEXT_IO.NEW_LINE;
-- end loop;
--TEXT_IO.PUT("}");
end LIST_SWEEP;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.Standard_Profile_L2.Utilities.Collections is
pragma Preelaborate;
package Standard_Profile_L2_Utility_Collections is
new AMF.Generic_Collections
(Standard_Profile_L2_Utility,
Standard_Profile_L2_Utility_Access);
type Set_Of_Standard_Profile_L2_Utility is
new Standard_Profile_L2_Utility_Collections.Set with null record;
Empty_Set_Of_Standard_Profile_L2_Utility : constant Set_Of_Standard_Profile_L2_Utility;
type Ordered_Set_Of_Standard_Profile_L2_Utility is
new Standard_Profile_L2_Utility_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_Standard_Profile_L2_Utility : constant Ordered_Set_Of_Standard_Profile_L2_Utility;
type Bag_Of_Standard_Profile_L2_Utility is
new Standard_Profile_L2_Utility_Collections.Bag with null record;
Empty_Bag_Of_Standard_Profile_L2_Utility : constant Bag_Of_Standard_Profile_L2_Utility;
type Sequence_Of_Standard_Profile_L2_Utility is
new Standard_Profile_L2_Utility_Collections.Sequence with null record;
Empty_Sequence_Of_Standard_Profile_L2_Utility : constant Sequence_Of_Standard_Profile_L2_Utility;
private
Empty_Set_Of_Standard_Profile_L2_Utility : constant Set_Of_Standard_Profile_L2_Utility
:= (Standard_Profile_L2_Utility_Collections.Set with null record);
Empty_Ordered_Set_Of_Standard_Profile_L2_Utility : constant Ordered_Set_Of_Standard_Profile_L2_Utility
:= (Standard_Profile_L2_Utility_Collections.Ordered_Set with null record);
Empty_Bag_Of_Standard_Profile_L2_Utility : constant Bag_Of_Standard_Profile_L2_Utility
:= (Standard_Profile_L2_Utility_Collections.Bag with null record);
Empty_Sequence_Of_Standard_Profile_L2_Utility : constant Sequence_Of_Standard_Profile_L2_Utility
:= (Standard_Profile_L2_Utility_Collections.Sequence with null record);
end AMF.Standard_Profile_L2.Utilities.Collections;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
package body AMF.Internals.Collections.Elements.Containers is
type Shared_Element_Collection_Container_Access is
access all Shared_Element_Collection_Container'Class;
---------
-- Add --
---------
overriding procedure Add
(Self : not null access Shared_Element_Collection_Container;
Item : not null AMF.Elements.Element_Access) is
begin
Self.Elements.Append (Item);
end Add;
-----------
-- Clear --
-----------
overriding procedure Clear
(Self : not null access Shared_Element_Collection_Container) is
begin
Self.Elements.Clear;
end Clear;
-------------
-- Element --
-------------
overriding function Element
(Self : not null access constant Shared_Element_Collection_Container;
Index : Positive) return not null AMF.Elements.Element_Access is
begin
return Self.Elements.Element (Index);
end Element;
------------
-- Length --
------------
overriding function Length
(Self : not null access constant Shared_Element_Collection_Container)
return Natural is
begin
return Natural (Self.Elements.Length);
end Length;
---------------
-- Reference --
---------------
overriding procedure Reference
(Self : not null access Shared_Element_Collection_Container) is
begin
Matreshka.Atomics.Counters.Increment (Self.Counter);
end Reference;
-----------------
-- Unreference --
-----------------
overriding procedure Unreference
(Self : not null access Shared_Element_Collection_Container)
is
procedure Free is
new Ada.Unchecked_Deallocation
(Shared_Element_Collection_Container'Class,
Shared_Element_Collection_Container_Access);
Aux : Shared_Element_Collection_Container_Access
:= Self.all'Unchecked_Access;
begin
if Matreshka.Atomics.Counters.Decrement (Self.Counter) then
Free (Aux);
end if;
end Unreference;
end AMF.Internals.Collections.Elements.Containers;
|
with Ada.Numerics.Generic_Elementary_Functions;
package body Shapes is
package Math is new Ada.Numerics.Generic_Elementary_Functions (Float_T);
function Distance
(Vertex1 : Vertex_T;
Vertex2 : Vertex_T)
return Float_T is
begin
return
Math.Sqrt ((Vertex1.X - Vertex2.X)**2 + (Vertex1.Y - Vertex2.Y)**2);
end Distance;
-- Implement primitives as defined in the spec
end Shapes;
|
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2021 onox <denkpadje@gmail.com>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
package Orka.SIMD.SSE2.Integers.Compare is
pragma Pure;
function "=" (Left, Right : m128i) return m128i
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_pcmpeqd128";
function ">" (Left, Right : m128i) return m128i
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_pcmpgtd128";
function "<" (Left, Right : m128i) return m128i is (Right > Left);
end Orka.SIMD.SSE2.Integers.Compare;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . W I D _ L L U --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Unsigned_Types; use System.Unsigned_Types;
package body System.Wid_LLU is
------------------------------
-- Width_Long_Long_Unsigned --
------------------------------
function Width_Long_Long_Unsigned
(Lo, Hi : Long_Long_Unsigned)
return Natural
is
W : Natural;
T : Long_Long_Unsigned;
begin
if Lo > Hi then
return 0;
else
-- Minimum value is 2, one for sign, one for digit
W := 2;
-- Get max of absolute values, but avoid bomb if we have the maximum
-- negative number (note that First + 1 has same digits as First)
T := Long_Long_Unsigned'Max (Lo, Hi);
-- Increase value if more digits required
while T >= 10 loop
T := T / 10;
W := W + 1;
end loop;
return W;
end if;
end Width_Long_Long_Unsigned;
end System.Wid_LLU;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Nodes.Elsif_Paths is
function Create
(Elsif_Token : not null Program.Lexical_Elements.Lexical_Element_Access;
Condition : not null Program.Elements.Expressions.Expression_Access;
Then_Token : not null Program.Lexical_Elements.Lexical_Element_Access;
Statements : not null Program.Element_Vectors.Element_Vector_Access)
return Elsif_Path is
begin
return Result : Elsif_Path :=
(Elsif_Token => Elsif_Token, Condition => Condition,
Then_Token => Then_Token, Statements => Statements,
Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Condition : not null Program.Elements.Expressions
.Expression_Access;
Statements : not null Program.Element_Vectors
.Element_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Elsif_Path is
begin
return Result : Implicit_Elsif_Path :=
(Condition => Condition, Statements => Statements,
Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Condition
(Self : Base_Elsif_Path)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Condition;
end Condition;
overriding function Statements
(Self : Base_Elsif_Path)
return not null Program.Element_Vectors.Element_Vector_Access is
begin
return Self.Statements;
end Statements;
overriding function Elsif_Token
(Self : Elsif_Path)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Elsif_Token;
end Elsif_Token;
overriding function Then_Token
(Self : Elsif_Path)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Then_Token;
end Then_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Elsif_Path)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Elsif_Path)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Elsif_Path)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize (Self : aliased in out Base_Elsif_Path'Class) is
begin
Set_Enclosing_Element (Self.Condition, Self'Unchecked_Access);
for Item in Self.Statements.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
null;
end Initialize;
overriding function Is_Elsif_Path_Element
(Self : Base_Elsif_Path)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Elsif_Path_Element;
overriding function Is_Path_Element
(Self : Base_Elsif_Path)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Path_Element;
overriding procedure Visit
(Self : not null access Base_Elsif_Path;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Elsif_Path (Self);
end Visit;
overriding function To_Elsif_Path_Text
(Self : aliased in out Elsif_Path)
return Program.Elements.Elsif_Paths.Elsif_Path_Text_Access is
begin
return Self'Unchecked_Access;
end To_Elsif_Path_Text;
overriding function To_Elsif_Path_Text
(Self : aliased in out Implicit_Elsif_Path)
return Program.Elements.Elsif_Paths.Elsif_Path_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Elsif_Path_Text;
end Program.Nodes.Elsif_Paths;
|
-- This spec has been automatically generated from STM32L4x1.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
-- STM32L4x1
package STM32_SVD is
pragma Preelaborate;
--------------------
-- Base addresses --
--------------------
DAC1_Base : constant System.Address :=
System'To_Address (16#40007400#);
DMA1_Base : constant System.Address :=
System'To_Address (16#40020000#);
DMA2_Base : constant System.Address :=
System'To_Address (16#40020400#);
CRC_Base : constant System.Address :=
System'To_Address (16#40023000#);
LCD_Base : constant System.Address :=
System'To_Address (16#40002400#);
TSC_Base : constant System.Address :=
System'To_Address (16#40024000#);
IWDG_Base : constant System.Address :=
System'To_Address (16#40003000#);
WWDG_Base : constant System.Address :=
System'To_Address (16#40002C00#);
COMP_Base : constant System.Address :=
System'To_Address (16#40010200#);
FIREWALL_Base : constant System.Address :=
System'To_Address (16#40011C00#);
I2C1_Base : constant System.Address :=
System'To_Address (16#40005400#);
I2C3_Base : constant System.Address :=
System'To_Address (16#40005C00#);
I2C2_Base : constant System.Address :=
System'To_Address (16#40005800#);
I2C4_Base : constant System.Address :=
System'To_Address (16#40008400#);
FLASH_Base : constant System.Address :=
System'To_Address (16#40022000#);
RCC_Base : constant System.Address :=
System'To_Address (16#40021000#);
PWR_Base : constant System.Address :=
System'To_Address (16#40007000#);
SYSCFG_Base : constant System.Address :=
System'To_Address (16#40010000#);
RNG_Base : constant System.Address :=
System'To_Address (16#50060800#);
AES_Base : constant System.Address :=
System'To_Address (16#50060000#);
ADC_Base : constant System.Address :=
System'To_Address (16#50040000#);
GPIOA_Base : constant System.Address :=
System'To_Address (16#48000000#);
GPIOB_Base : constant System.Address :=
System'To_Address (16#48000400#);
GPIOC_Base : constant System.Address :=
System'To_Address (16#48000800#);
GPIOD_Base : constant System.Address :=
System'To_Address (16#48000C00#);
GPIOE_Base : constant System.Address :=
System'To_Address (16#48001000#);
GPIOH_Base : constant System.Address :=
System'To_Address (16#48001C00#);
SAI1_Base : constant System.Address :=
System'To_Address (16#40015400#);
TIM2_Base : constant System.Address :=
System'To_Address (16#40000000#);
TIM3_Base : constant System.Address :=
System'To_Address (16#40000400#);
TIM15_Base : constant System.Address :=
System'To_Address (16#40014000#);
TIM16_Base : constant System.Address :=
System'To_Address (16#40014400#);
TIM1_Base : constant System.Address :=
System'To_Address (16#40012C00#);
TIM6_Base : constant System.Address :=
System'To_Address (16#40001000#);
TIM7_Base : constant System.Address :=
System'To_Address (16#40001400#);
LPTIM1_Base : constant System.Address :=
System'To_Address (16#40007C00#);
LPTIM2_Base : constant System.Address :=
System'To_Address (16#40009400#);
USART1_Base : constant System.Address :=
System'To_Address (16#40013800#);
USART2_Base : constant System.Address :=
System'To_Address (16#40004400#);
UART4_Base : constant System.Address :=
System'To_Address (16#40004C00#);
USART3_Base : constant System.Address :=
System'To_Address (16#40004800#);
LPUART1_Base : constant System.Address :=
System'To_Address (16#40008000#);
SPI1_Base : constant System.Address :=
System'To_Address (16#40013000#);
SPI3_Base : constant System.Address :=
System'To_Address (16#40003C00#);
SPI2_Base : constant System.Address :=
System'To_Address (16#40003800#);
SDMMC_Base : constant System.Address :=
System'To_Address (16#40012800#);
EXTI_Base : constant System.Address :=
System'To_Address (16#40010400#);
VREFBUF_Base : constant System.Address :=
System'To_Address (16#40010030#);
CAN1_Base : constant System.Address :=
System'To_Address (16#40006400#);
RTC_Base : constant System.Address :=
System'To_Address (16#40002800#);
SWPMI1_Base : constant System.Address :=
System'To_Address (16#40008800#);
OPAMP_Base : constant System.Address :=
System'To_Address (16#40007800#);
NVIC_Base : constant System.Address :=
System'To_Address (16#E000E000#);
CRS_Base : constant System.Address :=
System'To_Address (16#40006000#);
USB_SRAM_Base : constant System.Address :=
System'To_Address (16#40006C00#);
USB_FS_Base : constant System.Address :=
System'To_Address (16#40006800#);
DFSDM_Base : constant System.Address :=
System'To_Address (16#40016000#);
QUADSPI_Base : constant System.Address :=
System'To_Address (16#A0001000#);
DBGMCU_Base : constant System.Address :=
System'To_Address (16#E0042000#);
end STM32_SVD;
|
with Ada.Integer_Text_IO;
with Ada.Integer_Text_IO;
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Numerics;
with Ada.Numerics.Discrete_Random;
package body Data is
protected body Mutex is
entry Seize when not Owned is
begin
Owned := True;
end Seize;
Procedure Release is
begin
Owned := False;
end Release;
end Mutex;
function F1(A : in Matrix; D : in Matrix; B : in Vector; N : in Integer) return Matrix is
E : Matrix;
begin
E := Multiple(A, D, N);
E := Multiple(Max(B, N), E, N);
return E;
end F1;
function F2(a : in Integer; G : in Matrix; K : in Matrix; L : in Matrix; N : in Integer) return Matrix is
F,T : Matrix;
begin
T:=Trans(G,N);
F:=Multiple(a,T,N);
T:=Multiple(K,L,N);
F:=Amount(F,T,N);
return F;
end F2;
function F3(P : in Matrix; R : in Matrix; S : in Vector; T : in Vector; N : in Integer) return Vector is
O : Vector;
A : Matrix;
begin
A:=Multiple(P,R,N);
O:=Multiple(A,S,N);
O:=Amount(O,S,N);
return O;
end F3;
procedure Matrix_Input (A : out Matrix; N : in Integer) is
item : Integer;
begin
My_Mutex.Seize;
Put_Line ("Enter matrix values:");
for i in 1..N loop
for j in 1..N loop
Ada.Integer_Text_IO.Get (item);
A(i,j) := item;
end loop;
end loop;
My_Mutex.Release;
end Matrix_Input;
procedure Matrix_Output(A : in Matrix; N : in Integer; S: in String) is
begin
My_Mutex.Seize;
Put_Line(S);
for i in 1..N loop
for j in 1..N loop
Ada.Integer_Text_IO.Put(A(i,j));
end loop;
New_Line;
end loop;
My_Mutex.Release;
end Matrix_Output;
procedure Matrix_Generate (A : out Matrix; N : in Integer) is
type Rand_Range is range 1..10;
package Rand_Int is new Ada.Numerics.Discrete_Random(Rand_Range);
seed : Rand_Int.Generator;
Num : Rand_Range;
begin
Rand_Int.Reset(seed);
for i in 1..N loop
for j in 1..N loop
Num := Rand_Int.Random(seed);
A(i,j) := 1;
end loop;
end loop;
end Matrix_Generate;
procedure Vector_Generate (A : out Vector; N : in Integer) is
type Rand_Range is range 1..10;
package Rand_Int is new Ada.Numerics.Discrete_Random(Rand_Range);
seed : Rand_Int.Generator;
Num : Rand_Range;
begin
Rand_Int.Reset(seed);
for i in 1..N loop
Num := Rand_Int.Random(seed);
A(i) := 1;
end loop;
end Vector_Generate;
procedure Value_Generate (A : out Integer) is
type Rand_Range is range 1..10;
package Rand_Int is new Ada.Numerics.Discrete_Random(Rand_Range);
seed : Rand_Int.Generator;
Num : Rand_Range;
begin
Rand_Int.Reset(seed);
Num := Rand_Int.Random(seed);
A := 5;
end Value_Generate;
procedure Vector_Input (A : out Vector; N : in Integer) is
item : Integer;
begin
My_Mutex.Seize;
Put_Line ("Enter vector values:");
for i in 1..N loop
Ada.Integer_Text_IO.Get(item);
A(i) := item;
end loop;
My_Mutex.Release;
end Vector_Input;
procedure Vector_Output(A : in Vector; N : in Integer; S: in String) is
begin
My_Mutex.Seize;
Put_Line(S);
for i in 1..N loop
Ada.Integer_Text_IO.Put(A(i));
end loop;
New_Line;
My_Mutex.Release;
end Vector_Output;
function Max (A: Vector; N : in Integer) return Integer is
x : Integer;
begin
x := A(1);
for i in 1..N loop
if A(i)>x then
x := A(i);
end if;
end loop;
return x;
end Max;
function Amount ( A: in Vector; B: in Vector; N : in Integer) return Vector is
C : Vector;
begin
for i in 1..N loop
C(i):=A(i)+B(i);
end loop;
return C;
end Amount;
function Multiple ( A: in Integer; B: in out Matrix; N : in Integer) return Matrix is
C:Matrix;
begin
for i in 1..N loop
for j in 1..N loop
C(i,j):=A*B(i,j);
end loop;
end loop;
return C;
end Multiple;
function Trans (A: in Matrix; N : in Integer) return Matrix is
B:Matrix;
begin
for i in 1..N loop
for j in 1..N loop
B(i,j):=A(j,i);
end loop;
end loop;
return B;
end Trans;
function Amount ( A: in Matrix; B: in Matrix; N : in Integer) return Matrix is
C:Matrix;
begin
for i in 1..N loop
for j in 1..N loop
C(i,j):=A(i,j)+B(i,j);
end loop;
end loop;
return C;
end Amount;
function Multiple ( A: in Matrix; B: in Matrix; N : in Integer) return Matrix is
C:Matrix;
begin
for row in 1..N loop
for col in 1..N loop
C(row,col):=0;
for inner in 1..N loop
C(row,col) := C(row,col) + A(row,inner) * B(inner,col);
end loop;
end loop;
end loop;
return C;
end Multiple;
function Multiple ( A: in Matrix; B: in Vector; N : in Integer) return Vector is
C:Vector;
begin
for row in 1..N loop
C(row):=0;
for col in 1..N loop
C(row) := C(row) + A(row,col) * B(col);
end loop;
end loop;
return C;
end Multiple;
end Data;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Element_Vectors;
with Program.Elements.Defining_Names;
with Program.Elements.Parameter_Specifications;
with Program.Elements.Aspect_Specifications;
with Program.Elements.Generic_Function_Declarations;
with Program.Element_Visitors;
package Program.Nodes.Generic_Function_Declarations is
pragma Preelaborate;
type Generic_Function_Declaration is
new Program.Nodes.Node
and Program.Elements.Generic_Function_Declarations
.Generic_Function_Declaration
and Program.Elements.Generic_Function_Declarations
.Generic_Function_Declaration_Text
with private;
function Create
(Generic_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Formal_Parameters : Program.Element_Vectors.Element_Vector_Access;
Function_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Name : not null Program.Elements.Defining_Names
.Defining_Name_Access;
Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Return_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Not_Token : Program.Lexical_Elements.Lexical_Element_Access;
Null_Token : Program.Lexical_Elements.Lexical_Element_Access;
Result_Subtype : not null Program.Elements.Element_Access;
With_Token : Program.Lexical_Elements.Lexical_Element_Access;
Aspects : Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Generic_Function_Declaration;
type Implicit_Generic_Function_Declaration is
new Program.Nodes.Node
and Program.Elements.Generic_Function_Declarations
.Generic_Function_Declaration
with private;
function Create
(Formal_Parameters : Program.Element_Vectors.Element_Vector_Access;
Name : not null Program.Elements.Defining_Names
.Defining_Name_Access;
Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
Result_Subtype : not null Program.Elements.Element_Access;
Aspects : Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False;
Has_Not_Null : Boolean := False)
return Implicit_Generic_Function_Declaration
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Generic_Function_Declaration is
abstract new Program.Nodes.Node
and Program.Elements.Generic_Function_Declarations
.Generic_Function_Declaration
with record
Formal_Parameters : Program.Element_Vectors.Element_Vector_Access;
Name : not null Program.Elements.Defining_Names
.Defining_Name_Access;
Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
Result_Subtype : not null Program.Elements.Element_Access;
Aspects : Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
end record;
procedure Initialize
(Self : in out Base_Generic_Function_Declaration'Class);
overriding procedure Visit
(Self : not null access Base_Generic_Function_Declaration;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Formal_Parameters
(Self : Base_Generic_Function_Declaration)
return Program.Element_Vectors.Element_Vector_Access;
overriding function Name
(Self : Base_Generic_Function_Declaration)
return not null Program.Elements.Defining_Names.Defining_Name_Access;
overriding function Parameters
(Self : Base_Generic_Function_Declaration)
return Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
overriding function Result_Subtype
(Self : Base_Generic_Function_Declaration)
return not null Program.Elements.Element_Access;
overriding function Aspects
(Self : Base_Generic_Function_Declaration)
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
overriding function Is_Generic_Function_Declaration
(Self : Base_Generic_Function_Declaration)
return Boolean;
overriding function Is_Declaration
(Self : Base_Generic_Function_Declaration)
return Boolean;
type Generic_Function_Declaration is
new Base_Generic_Function_Declaration
and Program.Elements.Generic_Function_Declarations
.Generic_Function_Declaration_Text
with record
Generic_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Function_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Return_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Not_Token : Program.Lexical_Elements.Lexical_Element_Access;
Null_Token : Program.Lexical_Elements.Lexical_Element_Access;
With_Token : Program.Lexical_Elements.Lexical_Element_Access;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
end record;
overriding function To_Generic_Function_Declaration_Text
(Self : in out Generic_Function_Declaration)
return Program.Elements.Generic_Function_Declarations
.Generic_Function_Declaration_Text_Access;
overriding function Generic_Token
(Self : Generic_Function_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Function_Token
(Self : Generic_Function_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Left_Bracket_Token
(Self : Generic_Function_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Right_Bracket_Token
(Self : Generic_Function_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Return_Token
(Self : Generic_Function_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Not_Token
(Self : Generic_Function_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Null_Token
(Self : Generic_Function_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function With_Token
(Self : Generic_Function_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Semicolon_Token
(Self : Generic_Function_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Has_Not_Null
(Self : Generic_Function_Declaration)
return Boolean;
type Implicit_Generic_Function_Declaration is
new Base_Generic_Function_Declaration
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
Has_Not_Null : Boolean;
end record;
overriding function To_Generic_Function_Declaration_Text
(Self : in out Implicit_Generic_Function_Declaration)
return Program.Elements.Generic_Function_Declarations
.Generic_Function_Declaration_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Generic_Function_Declaration)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Generic_Function_Declaration)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Generic_Function_Declaration)
return Boolean;
overriding function Has_Not_Null
(Self : Implicit_Generic_Function_Declaration)
return Boolean;
end Program.Nodes.Generic_Function_Declarations;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2020, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of STMicroelectronics nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
-- --
-- This file is based on: --
-- --
-- @file stm32f4xx_hal_cortex.c --
-- @author MCD Application Team --
-- @version V1.1.0 --
-- @date 19-June-2014 --
-- @brief CORTEX HAL module driver. --
-- --
-- COPYRIGHT(c) 2014 STMicroelectronics --
------------------------------------------------------------------------------
with Cortex_M_SVD.NVIC; use Cortex_M_SVD.NVIC;
package body Cortex_M.NVIC is
------------------
-- Set_Priority --
------------------
procedure Set_Priority
(IRQn : Interrupt_ID;
Priority : Interrupt_Priority)
is
type As_Array (As_Arr : Boolean := True) is record
case As_Arr is
when True =>
Arr : UInt8_Array (0 .. 3);
when False =>
IPR : UInt32;
end case;
end record with Unchecked_Union, Pack, Size => 32;
IPR_Index : constant Natural := Natural (IRQn) / 4;
IP_Index : constant Natural := Natural (IRQn) mod 4;
IPR : As_Array;
begin
IPR.IPR := NVIC_Periph.NVIC_IPR (IPR_Index);
IPR.Arr (IP_Index) := UInt8 (Priority);
NVIC_Periph.NVIC_IPR (IPR_Index) := IPR.IPR;
end Set_Priority;
-------------
-- Enable_ --
-------------
procedure Enable_Interrupt (IRQn : Interrupt_ID) is
begin
NVIC_Periph.NVIC_ISER := Shift_Left (1, Natural (IRQn));
end Enable_Interrupt;
-------------
-- Disable --
-------------
procedure Disable_Interrupt (IRQn : Interrupt_ID) is
begin
NVIC_Periph.NVIC_ICER := Shift_Left (1, Natural (IRQn));
end Disable_Interrupt;
-------------
-- Enabled --
-------------
function Enabled (IRQn : Interrupt_ID) return Boolean is
begin
return ((NVIC_Periph.NVIC_ISER and Shift_Left (1, Natural (IRQn))) /= 0);
end Enabled;
-------------
-- Pending --
-------------
function Pending (IRQn : Interrupt_ID) return Boolean is
begin
return ((NVIC_Periph.NVIC_ISPR and Shift_Left (1, Natural (IRQn))) /= 0);
end Pending;
-----------------
-- Set_Pending --
-----------------
procedure Set_Pending (IRQn : Interrupt_ID) is
begin
NVIC_Periph.NVIC_ISPR := Shift_Left (1, Natural (IRQn));
end Set_Pending;
-------------------
-- Clear_Pending --
-------------------
procedure Clear_Pending (IRQn : Interrupt_ID) is
begin
NVIC_Periph.NVIC_ICPR := Shift_Left (1, Natural (IRQn));
end Clear_Pending;
end Cortex_M.NVIC;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2019, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with SAM.Clock_Generator;
package SAM.Clock_Setup_120Mhz is
procedure Initialize_Clocks;
Clk_CPU : constant SAM.Clock_Generator.Generator_Id := 0;
Clk_120Mhz : constant SAM.Clock_Generator.Generator_Id := Clk_CPU;
Clk_48Mhz : constant SAM.Clock_Generator.Generator_Id := 1;
Clk_32Khz : constant SAM.Clock_Generator.Generator_Id := 3;
Clk_2Mhz : constant SAM.Clock_Generator.Generator_Id := 5;
end SAM.Clock_Setup_120Mhz;
|
with DDS.Publisher;
with DDS.Subscriber;
with DDS.Request_Reply.Connext_C_Replier;
with DDS.Request_Reply.Connext_C_Entity_Params;
with DDS.Typed_DataWriter_Generic;
with DDS.Typed_DataReader_Generic;
generic
with package Reply_DataWriter is new DDS.Typed_DataWriter_Generic (<>);
with package Request_DataReader is new DDS.Typed_DataReader_Generic (<>);
package Dds.Request_Reply.Connext_C_Replier.Simple_Replier_Generic is
use Connext_C_Entity_Params;
type Ref (<>) is new Dds.Request_Reply.Connext_C_Replier.RTI_Connext_Replier with private;
type Ref_Access is access all Ref'Class;
function Create_With_Profile (Participant : DDS.DomainParticipant.Ref_Access;
Service_Name : DDS.String;
Qos_Library_Name : DDS.String;
Qos_Profile_Name : DDS.String;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create_With_Profile (Participant : DDS.DomainParticipant.Ref_Access;
Request_Topic_Name : DDS.String;
Reply_Topic_Name : DDS.String;
Qos_Library_Name : DDS.String;
Qos_Profile_Name : DDS.String;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create_With_Profile (Publisher : not null DDS.Publisher.Ref_Access;
Subscriber : not null DDS.Subscriber.Ref_Access;
Service_Name : DDS.String;
Qos_Library_Name : DDS.String;
Qos_Profile_Name : DDS.String;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create_With_Profile (Publisher : not null DDS.Publisher.Ref_Access;
Subscriber : not null DDS.Subscriber.Ref_Access;
Request_Topic_Name : DDS.String;
Reply_Topic_Name : DDS.String;
Qos_Library_Name : DDS.String;
Qos_Profile_Name : DDS.String;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
------
function Create (Participant : DDS.DomainParticipant.Ref_Access;
Service_Name : DDS.String;
DataReader_QoS : DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT;
DataWriter_QoS : DDS.DataWriterQoS := DDS.Publisher.DATAWRITER_QOS_DEFAULT;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create (Participant : DDS.DomainParticipant.Ref_Access;
Request_Topic_Name : DDS.String;
Reply_Topic_Name : DDS.String;
DataReader_QoS : DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT;
DataWriter_QoS : DDS.DataWriterQoS := DDS.Publisher.DATAWRITER_QOS_DEFAULT;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create (Publisher : not null DDS.Publisher.Ref_Access;
Subscriber : not null DDS.Subscriber.Ref_Access;
Service_Name : DDS.String;
DataReader_QoS : DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT;
DataWriter_QoS : DDS.DataWriterQoS := DDS.Publisher.DATAWRITER_QOS_DEFAULT;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
function Create (Publisher : not null DDS.Publisher.Ref_Access;
Subscriber : not null DDS.Subscriber.Ref_Access;
Request_Topic_Name : DDS.String;
Reply_Topic_Name : DDS.String;
DataReader_QoS : DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT;
DataWriter_QoS : DDS.DataWriterQoS := DDS.Publisher.DATAWRITER_QOS_DEFAULT;
Listner : RTI_Connext_SimpleReplierListener_Access := null) return Ref_Access;
type RTI_Connext_SimpleReplierParams is new RTI_Connext_EntityParams with record
Simple_Listener : RTI_Connext_SimpleReplierListener;
end record;
function Create (Params : RTI_Connext_SimpleReplierParams) return Ref_Access;
procedure Delete (Self : in out Ref_Access);
function Get_Request_Datareader (Self : not null access Ref) return Request_DataReader.Ref_Access;
function Get_Reply_Datawriter (Self : not null access Ref) return Reply_DataWriter.Ref_Access;
private
type Ref (Simple_Listener : RTI_Connext_SimpleReplierListener_Access) is new Dds.Request_Reply.Connext_C_Replier.RTI_Connext_Replier with record
null;
end record;
end Dds.Request_Reply.Connext_C_Replier.Simple_Replier_Generic;
|
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line ("ADA says: Hello, world!");
end Hello;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>linebuffer_Loop_1_pr</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>in_axi_stream_V_value_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream&lt;AxiPackedStencil&lt;unsigned char, 1, 1, 1, 1&gt; &gt;.V.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>in_axi_stream_V_last_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream&lt;AxiPackedStencil&lt;unsigned char, 1, 1, 1, 1&gt; &gt;.V.last.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>in_stream_V_value_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>FIFO_SRL</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>10</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_4">
<Value>
<Obj>
<type>0</type>
<id>6</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name>indvar_flatten</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>36</item>
<item>37</item>
<item>38</item>
<item>39</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>9</id>
<name>exitcond_flatten</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>40</item>
<item>42</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>10</id>
<name>indvar_flatten_next</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>43</item>
<item>45</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>46</item>
<item>47</item>
<item>48</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name>empty_19</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</fileDirectory>
<lineNumber>554</lineNumber>
<contextFuncName>linebuffer&lt;4, 4, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</first>
<second class_id="12" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="13" tracking_level="0" version="0">
<first class_id="14" tracking_level="0" version="0">
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer&lt;4, 4, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</second>
</first>
<second>554</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>26</item>
<item>27</item>
<item>28</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>17</id>
<name>tmp_value_V</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</fileDirectory>
<lineNumber>554</lineNumber>
<contextFuncName>linebuffer&lt;4, 4, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer&lt;4, 4, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</second>
</first>
<second>554</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</oprand_edges>
<opcode>extractvalue</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>18</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</fileDirectory>
<lineNumber>554</lineNumber>
<contextFuncName>linebuffer&lt;4, 4, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer&lt;4, 4, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</second>
</first>
<second>554</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>31</item>
<item>32</item>
<item>33</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</fileDirectory>
<lineNumber>552</lineNumber>
<contextFuncName>linebuffer&lt;4, 4, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/paper_apps_8_shifts/sharpen</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer&lt;4, 4, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</second>
</first>
<second>552</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_14">
<Value>
<Obj>
<type>2</type>
<id>35</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_15">
<Value>
<Obj>
<type>2</type>
<id>41</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<const_type>0</const_type>
<content>16</content>
</item>
<item class_id_reference="16" object_id="_16">
<Value>
<Obj>
<type>2</type>
<id>44</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_17">
<Obj>
<type>3</type>
<id>7</id>
<name>newFuncRoot</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_18">
<Obj>
<type>3</type>
<id>12</id>
<name>.preheader.i</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_19">
<Obj>
<type>3</type>
<id>21</id>
<name>.preheader4.i</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>16</item>
<item>17</item>
<item>18</item>
<item>20</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_20">
<Obj>
<type>3</type>
<id>23</id>
<name>.critedge.exitStub</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>22</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_21">
<id>24</id>
<edge_type>2</edge_type>
<source_obj>12</source_obj>
<sink_obj>6</sink_obj>
</item>
<item class_id_reference="20" object_id="_22">
<id>27</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_23">
<id>28</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_24">
<id>29</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_25">
<id>32</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_26">
<id>33</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_27">
<id>34</id>
<edge_type>2</edge_type>
<source_obj>12</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_28">
<id>36</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_29">
<id>37</id>
<edge_type>2</edge_type>
<source_obj>7</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_30">
<id>38</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_31">
<id>39</id>
<edge_type>2</edge_type>
<source_obj>21</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_32">
<id>40</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_33">
<id>42</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_34">
<id>43</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_35">
<id>45</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_36">
<id>46</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_37">
<id>47</id>
<edge_type>2</edge_type>
<source_obj>21</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_38">
<id>48</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_39">
<id>108</id>
<edge_type>2</edge_type>
<source_obj>7</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_40">
<id>109</id>
<edge_type>2</edge_type>
<source_obj>12</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_41">
<id>110</id>
<edge_type>2</edge_type>
<source_obj>12</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_42">
<id>111</id>
<edge_type>2</edge_type>
<source_obj>21</source_obj>
<sink_obj>12</sink_obj>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_43">
<mId>1</mId>
<mTag>linebuffer_Loop_1_pr</mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>4</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>18</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_44">
<mId>2</mId>
<mTag>Entry</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_45">
<mId>3</mId>
<mTag>Loop 1</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>12</item>
<item>21</item>
</basic_blocks>
<mII>1</mII>
<mDepth>2</mDepth>
<mMinTripCount>16</mMinTripCount>
<mMaxTripCount>16</mMaxTripCount>
<mMinLatency>16</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_46">
<mId>4</mId>
<mTag>Return</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_47">
<states class_id="25" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_48">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_49">
<id>4</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_50">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_51">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_52">
<id>2</id>
<operations>
<count>6</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_53">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_54">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_55">
<id>10</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_56">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_57">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_58">
<id>17</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_59">
<id>3</id>
<operations>
<count>6</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_60">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_61">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_62">
<id>15</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_63">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_64">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_65">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_66">
<id>4</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_67">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_68">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>12</id>
<sop class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_69">
<inState>3</inState>
<outState>2</outState>
<condition>
<id>20</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_70">
<inState>2</inState>
<outState>4</outState>
<condition>
<id>19</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item class_id="34" tracking_level="0" version="0">
<first class_id="35" tracking_level="0" version="0">
<first>9</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_71">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>21</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>9</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="-1"></res>
<node_label_latency class_id="37" tracking_level="0" version="0">
<count>10</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>6</first>
<second class_id="39" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>8</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>9</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>10</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>11</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="40" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="41" tracking_level="0" version="0">
<first>7</first>
<second class_id="42" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>1</first>
<second>2</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="43" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="44" tracking_level="1" version="0" object_id="_72">
<region_name>Loop 1</region_name>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>12</item>
<item>21</item>
</basic_blocks>
<nodes>
<count>0</count>
<item_version>0</item_version>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>8</region_type>
<interval>1</interval>
<pipe_depth>2</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="45" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="46" tracking_level="0" version="0">
<first>48</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>56</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>67</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>74</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>80</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>86</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="48" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="49" tracking_level="0" version="0">
<first>exitcond_flatten_fu_74</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>indvar_flatten_next_fu_80</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>indvar_flatten_phi_fu_67</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>tmp_value_V_fu_86</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>2</count>
<item_version>0</item_version>
<item>
<first>StgValue_17_write_fu_56</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>empty_19_read_fu_48</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="50" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>4</count>
<item_version>0</item_version>
<item>
<first>63</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>90</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>94</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>99</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>4</count>
<item_version>0</item_version>
<item>
<first>exitcond_flatten_reg_90</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>indvar_flatten_next_reg_94</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>indvar_flatten_reg_63</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>tmp_value_V_reg_99</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>63</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>indvar_flatten_reg_63</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="51" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="52" tracking_level="0" version="0">
<first>in_axi_stream_V_last_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
</second>
</item>
<item>
<first>in_axi_stream_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
</second>
</item>
<item>
<first>in_stream_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="53" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="54" tracking_level="0" version="0">
<first>3</first>
<second>FIFO_SRL</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Element_Vectors is
procedure Skip_Elements
(Self : Iterator;
Pos : in out Element_Cursor;
Step : Integer);
-- Find a good Element starting from Pos.Index and set other fields of Pos
------------------
-- Each_Element --
------------------
function Each_Element
(Self : access Element_Vector'Class;
When_Element : Element_Checker := null) return Iterator is
begin
return (Vector => Self, Condition => When_Element);
end Each_Element;
-----------
-- First --
-----------
overriding function First
(Self : Iterator) return Program.Element_Vectors.Element_Cursor is
begin
return Result : Element_Cursor := (Index => 1, others => <>) do
Self.Skip_Elements (Result, Step => 1);
end return;
end First;
----------
-- Last --
----------
overriding function Last
(Self : Iterator) return Program.Element_Vectors.Element_Cursor is
begin
return Result : Element_Cursor :=
(Index => Self.Vector.Length, others => <>)
do
Self.Skip_Elements (Result, Step => -1);
end return;
end Last;
----------
-- Next --
----------
overriding function Next
(Self : Iterator;
Cursor : Program.Element_Vectors.Element_Cursor)
return Program.Element_Vectors.Element_Cursor is
begin
return Result : Element_Cursor := Cursor do
Result.Index := Result.Index + 1;
Self.Skip_Elements (Result, Step => 1);
end return;
end Next;
--------------
-- Previous --
--------------
overriding function Previous
(Self : Iterator;
Cursor : Program.Element_Vectors.Element_Cursor)
return Program.Element_Vectors.Element_Cursor is
begin
return Result : Element_Cursor := Cursor do
Result.Index := Result.Index - 1;
Self.Skip_Elements (Result, Step => -1);
end return;
end Previous;
-------------------
-- Skip_Elements --
-------------------
procedure Skip_Elements
(Self : Iterator;
Pos : in out Element_Cursor;
Step : Integer) is
begin
while Pos.Index in 1 .. Self.Vector.Length
and then Self.Condition /= null
and then not Self.Condition (Self.Vector.Element (Pos.Index).all)
loop
Pos.Index := Pos.Index + Step;
end loop;
if Pos.Index in 1 .. Self.Vector.Length then
Pos := (Self.Vector.Element (Pos.Index),
Self.Vector.Delimiter (Pos.Index),
Pos.Index,
Pos.Index = Self.Vector.Length);
else
Pos := (null, null, 0, False);
end if;
end Skip_Elements;
end Program.Element_Vectors;
|
-----------------------------------------------------------------------
-- asf-validators-numbers -- ASF Number Validators
-- Copyright (C) 2011, 2012 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Beans.Objects;
package body ASF.Validators.Numbers is
-- ------------------------------
-- Create a range validator to check that the value is between the minimum and the maximum.
-- ------------------------------
function Create_Range_Validator (Minimum : in Long_Long_Integer;
Maximum : in Long_Long_Integer) return Validator_Access is
Result : constant Range_Validator_Access := new Range_Validator;
begin
Result.Minimum := Minimum;
Result.Maximum := Maximum;
return Result.all'Access;
end Create_Range_Validator;
-- ------------------------------
-- Verify that the value is between the validator minimum and maximum
-- boundaries.
-- If some error are found, the procedure should create a <b>FacesMessage</b>
-- describing the problem and add that message to the current faces context.
-- The procedure can examine the state and modify the component tree.
-- It must raise the <b>Invalid_Value</b> exception if the value is not valid.
-- ------------------------------
procedure Validate (Valid : in Range_Validator;
Context : in out ASF.Contexts.Faces.Faces_Context'Class;
Component : in out ASF.Components.Base.UIComponent'Class;
Value : in EL.Objects.Object) is
begin
if EL.Objects.Is_Null (Value) then
return;
end if;
declare
N : constant Long_Long_Integer := EL.Objects.To_Long_Long_Integer (Value);
begin
if N > Valid.Maximum then
Component.Add_Message (Name => ASF.Components.VALIDATOR_MESSAGE_NAME,
Default => MAXIMUM_MESSAGE_ID,
Arg1 => Util.Beans.Objects.To_Object (Valid.Maximum),
Arg2 => Component.Get_Label (Context),
Context => Context);
raise Invalid_Value;
end if;
if N < Valid.Minimum then
Component.Add_Message (Name => ASF.Components.VALIDATOR_MESSAGE_NAME,
Default => MINIMUM_MESSAGE_ID,
Arg1 => Util.Beans.Objects.To_Object (Valid.Minimum),
Arg2 => Component.Get_Label (Context),
Context => Context);
raise Invalid_Value;
end if;
end;
exception
when others =>
Component.Add_Message (Name => ASF.Components.VALIDATOR_MESSAGE_NAME,
Default => TYPE_MESSAGE_ID,
Arg1 => Util.Beans.Objects.To_Object (Valid.Minimum),
Arg2 => Component.Get_Label (Context),
Context => Context);
raise Invalid_Value;
end Validate;
end ASF.Validators.Numbers;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="15">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>circ_buff_write_128</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>gmem_out</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>128</bitwidth>
</Value>
<direction>2</direction>
<if_type>4</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>output_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>output.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>stream_in_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>fifo.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>reset</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>reset</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>85</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>6</id>
<name>output_V_read</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>output.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>119</item>
<item>120</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.00</m_delay>
<m_topoIndex>1</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>7</id>
<name>tmp_1</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>28</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>122</item>
<item>123</item>
<item>125</item>
<item>127</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>2</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name>tmp_17_cast</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>128</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>3</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name>data_V</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second class_id="12" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="13" tracking_level="0" version="0">
<first class_id="14" tracking_level="0" version="0">
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>data.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>96</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>130</item>
</oprand_edges>
<opcode>alloca</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>4</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>19</id>
<name>reset_read</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>47</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>47</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>132</item>
<item>133</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.00</m_delay>
<m_topoIndex>5</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>tmp</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>47</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>47</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>134</item>
<item>136</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.85</m_delay>
<m_topoIndex>6</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>47</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>47</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>137</item>
<item>138</item>
<item>139</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>7</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>output_V2_sum</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>140</item>
<item>142</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.15</m_delay>
<m_topoIndex>8</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>output_V2_sum_cast</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>143</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>9</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>gmem_out_addr</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>128</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>144</item>
<item>145</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>10</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>stream_tail_V_req</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>147</item>
<item>148</item>
<item>150</item>
</oprand_edges>
<opcode>readreq</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.91</m_delay>
<m_topoIndex>11</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>stream_tail_V</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>stream_tail.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>128</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>152</item>
<item>153</item>
<item>467</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.91</m_delay>
<m_topoIndex>12</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name>stream_head_V_load</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>154</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>13</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>29</id>
<name>lhs_V_cast</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>10</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>155</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>14</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name>ret_V</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>ret.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>10</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>156</item>
<item>158</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.92</m_delay>
<m_topoIndex>15</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>31</id>
<name>ret_V_2_cast6</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>159</item>
<item>161</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.92</m_delay>
<m_topoIndex>16</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>32</id>
<name>ret_V_2_cast5</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>128</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>162</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>1</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>1</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>17</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>33</id>
<name>ret_V_2_cast</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>129</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>163</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>18</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>34</id>
<name>tmp_3_cast</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>129</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>164</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>19</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>tmp_4</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>165</item>
<item>166</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.46</m_delay>
<m_topoIndex>20</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>ret_V_cast</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>129</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>167</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>21</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>tmp_6</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>168</item>
<item>169</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.46</m_delay>
<m_topoIndex>22</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name>or_cond</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>170</item>
<item>171</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.33</m_delay>
<m_topoIndex>23</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>39</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>172</item>
<item>173</item>
<item>174</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>24</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>41</id>
<name>tmp_7</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>175</item>
<item>176</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>1</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.46</m_delay>
<m_topoIndex>25</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>42</id>
<name>tmp_8</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>177</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>26</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>43</id>
<name>tmp_2</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>178</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>27</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>44</id>
<name>p_neg1_pn_v_cast_cast</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>179</item>
<item>181</item>
<item>183</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>1</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.47</m_delay>
<m_topoIndex>28</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>45</id>
<name>p_neg1_pn</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>184</item>
<item>185</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>1</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>29</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name>bytes_to_write</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>bytes_to_write</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>186</item>
<item>187</item>
</oprand_edges>
<opcode>sub</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>1</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.82</m_delay>
<m_topoIndex>30</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>47</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>85</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>85</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>188</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.75</m_delay>
<m_topoIndex>31</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name>h</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>h</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>190</item>
<item>191</item>
<item>192</item>
<item>193</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>32</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>50</id>
<name>bytes_to_write_2</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>85</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>85</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>bytes_to_write</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>194</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>33</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>51</id>
<name>tmp_s</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>85</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>85</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>195</item>
<item>196</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.86</m_delay>
<m_topoIndex>34</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name>h_1</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>85</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>85</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>h</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>197</item>
<item>199</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.00</m_delay>
<m_topoIndex>35</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>53</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>85</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>85</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>200</item>
<item>201</item>
<item>202</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.75</m_delay>
<m_topoIndex>36</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name>stream_in_V_read</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>89</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>89</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>65</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>204</item>
<item>205</item>
</oprand_edges>
<opcode>nbread</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>37</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>57</id>
<name>empty_n</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>89</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>89</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>empty_n</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>206</item>
</oprand_edges>
<opcode>extractvalue</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>38</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name>tmp_22</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>89</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>89</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>207</item>
</oprand_edges>
<opcode>extractvalue</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>39</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>59</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>89</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>89</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>208</item>
<item>209</item>
<item>210</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.75</m_delay>
<m_topoIndex>40</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>61</id>
<name>tmp_20</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>95</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>95</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>212</item>
<item>213</item>
<item>476</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>41</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>62</id>
<name>tmp_21</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>95</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>95</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>214</item>
<item>216</item>
</oprand_edges>
<opcode>shl</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>42</m_topoIndex>
<m_clusterGroupNumber>1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_47">
<Value>
<Obj>
<type>0</type>
<id>63</id>
<name>tmp_3</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>89</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>89</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>217</item>
<item>218</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.44</m_delay>
<m_topoIndex>43</m_topoIndex>
<m_clusterGroupNumber>1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_48">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name>tmp_5</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>95</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>95</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>220</item>
<item>221</item>
<item>223</item>
<item>225</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>44</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>65</id>
<name>tmp_10</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>95</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>95</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>96</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>227</item>
<item>228</item>
<item>229</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>45</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name>tmp_11</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>105</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>105</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>230</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>46</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_51">
<Value>
<Obj>
<type>0</type>
<id>67</id>
<name>data_V_addr</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>105</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>105</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>231</item>
<item>233</item>
<item>234</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>47</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_52">
<Value>
<Obj>
<type>0</type>
<id>68</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>105</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>105</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>235</item>
<item>236</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.35</m_delay>
<m_topoIndex>48</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_53">
<Value>
<Obj>
<type>0</type>
<id>69</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>85</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>85</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>237</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>49</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_54">
<Value>
<Obj>
<type>0</type>
<id>71</id>
<name>bytes_to_write_1</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>bytes_to_write</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>238</item>
<item>239</item>
<item>240</item>
<item>241</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>50</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_55">
<Value>
<Obj>
<type>0</type>
<id>72</id>
<name>tmp_9</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>85</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>85</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>242</item>
<item>244</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.86</m_delay>
<m_topoIndex>51</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_56">
<Value>
<Obj>
<type>0</type>
<id>73</id>
<name>tmp_14</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>85</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>85</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>245</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>52</m_topoIndex>
<m_clusterGroupNumber>2</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_57">
<Value>
<Obj>
<type>0</type>
<id>74</id>
<name>tmp_17</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>85</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>85</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>246</item>
<item>247</item>
<item>249</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>53</m_topoIndex>
<m_clusterGroupNumber>2</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_58">
<Value>
<Obj>
<type>0</type>
<id>75</id>
<name>tmp_18</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>109</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>109</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>250</item>
<item>251</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.92</m_delay>
<m_topoIndex>54</m_topoIndex>
<m_clusterGroupNumber>2</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_59">
<Value>
<Obj>
<type>0</type>
<id>76</id>
<name>tmp_19</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>109</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>109</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>128</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>252</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>55</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_60">
<Value>
<Obj>
<type>0</type>
<id>77</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>109</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>109</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>253</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.75</m_delay>
<m_topoIndex>56</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_61">
<Value>
<Obj>
<type>0</type>
<id>79</id>
<name>t_V</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>115</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>115</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>t.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>254</item>
<item>255</item>
<item>256</item>
<item>257</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>57</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_62">
<Value>
<Obj>
<type>0</type>
<id>80</id>
<name>h1</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>h</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>258</item>
<item>259</item>
<item>260</item>
<item>261</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>58</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_63">
<Value>
<Obj>
<type>0</type>
<id>81</id>
<name>h1_cast</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>109</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>109</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>262</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>59</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_64">
<Value>
<Obj>
<type>0</type>
<id>82</id>
<name>tmp_12</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>109</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>109</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>263</item>
<item>264</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.86</m_delay>
<m_topoIndex>60</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_65">
<Value>
<Obj>
<type>0</type>
<id>84</id>
<name>h_2</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>109</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>109</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>h</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>265</item>
<item>266</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.00</m_delay>
<m_topoIndex>61</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_66">
<Value>
<Obj>
<type>0</type>
<id>85</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>109</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>109</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>267</item>
<item>268</item>
<item>269</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>62</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_67">
<Value>
<Obj>
<type>0</type>
<id>90</id>
<name>tmp_14_cast</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>270</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>63</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_68">
<Value>
<Obj>
<type>0</type>
<id>91</id>
<name>tmp_15</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>271</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>64</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_69">
<Value>
<Obj>
<type>0</type>
<id>92</id>
<name>data_V_addr_1</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>272</item>
<item>273</item>
<item>274</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>65</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_70">
<Value>
<Obj>
<type>0</type>
<id>93</id>
<name>data_V_load</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>96</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>275</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.35</m_delay>
<m_topoIndex>66</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_71">
<Value>
<Obj>
<type>0</type>
<id>94</id>
<name>extLd</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>128</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>276</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>73</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_72">
<Value>
<Obj>
<type>0</type>
<id>95</id>
<name>output_V2_sum4</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>277</item>
<item>278</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.15</m_delay>
<m_topoIndex>67</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_73">
<Value>
<Obj>
<type>0</type>
<id>96</id>
<name>output_V2_sum4_cast</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>279</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>70</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_74">
<Value>
<Obj>
<type>0</type>
<id>97</id>
<name>gmem_out_addr_1</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>128</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>280</item>
<item>281</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>71</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_75">
<Value>
<Obj>
<type>0</type>
<id>98</id>
<name>gmem_out_addr_1_req</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>283</item>
<item>284</item>
<item>285</item>
</oprand_edges>
<opcode>writereq</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.91</m_delay>
<m_topoIndex>72</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_76">
<Value>
<Obj>
<type>0</type>
<id>99</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>7</count>
<item_version>0</item_version>
<item>287</item>
<item>288</item>
<item>289</item>
<item>290</item>
<item>469</item>
<item>472</item>
<item>473</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.91</m_delay>
<m_topoIndex>74</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_77">
<Value>
<Obj>
<type>0</type>
<id>100</id>
<name>gmem_out_addr_1_resp</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>113</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>113</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>292</item>
<item>293</item>
<item>468</item>
</oprand_edges>
<opcode>writeresp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.91</m_delay>
<m_topoIndex>75</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_78">
<Value>
<Obj>
<type>0</type>
<id>101</id>
<name>tmp_16</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>115</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>115</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>294</item>
<item>295</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.92</m_delay>
<m_topoIndex>68</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_79">
<Value>
<Obj>
<type>0</type>
<id>102</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>116</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>116</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>296</item>
<item>297</item>
<item>474</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>69</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_80">
<Value>
<Obj>
<type>0</type>
<id>104</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>109</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>109</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>298</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>76</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_81">
<Value>
<Obj>
<type>0</type>
<id>106</id>
<name>output_V2_sum3</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>121</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>121</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>299</item>
<item>301</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.15</m_delay>
<m_topoIndex>77</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_82">
<Value>
<Obj>
<type>0</type>
<id>107</id>
<name>output_V2_sum3_cast</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>121</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>121</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>302</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>78</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_83">
<Value>
<Obj>
<type>0</type>
<id>108</id>
<name>gmem_out_addr_2</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>121</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>121</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>128</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>303</item>
<item>304</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>79</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_84">
<Value>
<Obj>
<type>0</type>
<id>109</id>
<name>gmem_out_addr_2_req</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>121</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>121</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>305</item>
<item>306</item>
<item>307</item>
</oprand_edges>
<opcode>writereq</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.91</m_delay>
<m_topoIndex>80</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_85">
<Value>
<Obj>
<type>0</type>
<id>110</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>121</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>121</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>6</count>
<item_version>0</item_version>
<item>308</item>
<item>309</item>
<item>310</item>
<item>311</item>
<item>471</item>
<item>475</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.91</m_delay>
<m_topoIndex>81</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_86">
<Value>
<Obj>
<type>0</type>
<id>111</id>
<name>gmem_out_addr_2_resp</name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>121</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>121</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>312</item>
<item>313</item>
<item>470</item>
</oprand_edges>
<opcode>writeresp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.91</m_delay>
<m_topoIndex>82</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_87">
<Value>
<Obj>
<type>0</type>
<id>112</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>314</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>83</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_88">
<Value>
<Obj>
<type>0</type>
<id>114</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>315</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>84</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_89">
<Value>
<Obj>
<type>0</type>
<id>116</id>
<name></name>
<fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName>
<fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory>
<lineNumber>124</lineNumber>
<contextFuncName>circ_buff_write_128</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>estream_write/c_src/circ_buff_write_128.cpp</first>
<second>circ_buff_write_128</second>
</first>
<second>124</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>85</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>19</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_90">
<Value>
<Obj>
<type>2</type>
<id>124</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>4</content>
</item>
<item class_id_reference="16" object_id="_91">
<Value>
<Obj>
<type>2</type>
<id>126</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>31</content>
</item>
<item class_id_reference="16" object_id="_92">
<Value>
<Obj>
<type>2</type>
<id>129</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_93">
<Value>
<Obj>
<type>2</type>
<id>135</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_94">
<Value>
<Obj>
<type>2</type>
<id>141</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<const_type>0</const_type>
<content>512</content>
</item>
<item class_id_reference="16" object_id="_95">
<Value>
<Obj>
<type>2</type>
<id>149</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_96">
<Value>
<Obj>
<type>2</type>
<id>157</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>10</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_97">
<Value>
<Obj>
<type>2</type>
<id>160</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_98">
<Value>
<Obj>
<type>2</type>
<id>180</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<const_type>0</const_type>
<content>65535</content>
</item>
<item class_id_reference="16" object_id="_99">
<Value>
<Obj>
<type>2</type>
<id>182</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<const_type>0</const_type>
<content>511</content>
</item>
<item class_id_reference="16" object_id="_100">
<Value>
<Obj>
<type>2</type>
<id>189</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_101">
<Value>
<Obj>
<type>2</type>
<id>198</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_102">
<Value>
<Obj>
<type>2</type>
<id>215</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>32</content>
</item>
<item class_id_reference="16" object_id="_103">
<Value>
<Obj>
<type>2</type>
<id>222</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>32</content>
</item>
<item class_id_reference="16" object_id="_104">
<Value>
<Obj>
<type>2</type>
<id>224</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>63</content>
</item>
<item class_id_reference="16" object_id="_105">
<Value>
<Obj>
<type>2</type>
<id>232</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_106">
<Value>
<Obj>
<type>2</type>
<id>243</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_107">
<Value>
<Obj>
<type>2</type>
<id>248</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_108">
<Value>
<Obj>
<type>2</type>
<id>300</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<const_type>0</const_type>
<content>513</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>12</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_109">
<Obj>
<type>3</type>
<id>22</id>
<name>codeRepl</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>7</count>
<item_version>0</item_version>
<item>6</item>
<item>7</item>
<item>8</item>
<item>13</item>
<item>19</item>
<item>20</item>
<item>21</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_110">
<Obj>
<type>3</type>
<id>40</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>17</count>
<item_version>0</item_version>
<item>23</item>
<item>24</item>
<item>25</item>
<item>26</item>
<item>27</item>
<item>28</item>
<item>29</item>
<item>30</item>
<item>31</item>
<item>32</item>
<item>33</item>
<item>34</item>
<item>35</item>
<item>36</item>
<item>37</item>
<item>38</item>
<item>39</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_111">
<Obj>
<type>3</type>
<id>48</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>7</count>
<item_version>0</item_version>
<item>41</item>
<item>42</item>
<item>43</item>
<item>44</item>
<item>45</item>
<item>46</item>
<item>47</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_112">
<Obj>
<type>3</type>
<id>54</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>5</count>
<item_version>0</item_version>
<item>49</item>
<item>50</item>
<item>51</item>
<item>52</item>
<item>53</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_113">
<Obj>
<type>3</type>
<id>60</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>56</item>
<item>57</item>
<item>58</item>
<item>59</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_114">
<Obj>
<type>3</type>
<id>70</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>9</count>
<item_version>0</item_version>
<item>61</item>
<item>62</item>
<item>63</item>
<item>64</item>
<item>65</item>
<item>66</item>
<item>67</item>
<item>68</item>
<item>69</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_115">
<Obj>
<type>3</type>
<id>78</id>
<name>.loopexit</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>7</count>
<item_version>0</item_version>
<item>71</item>
<item>72</item>
<item>73</item>
<item>74</item>
<item>75</item>
<item>76</item>
<item>77</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_116">
<Obj>
<type>3</type>
<id>86</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>6</count>
<item_version>0</item_version>
<item>79</item>
<item>80</item>
<item>81</item>
<item>82</item>
<item>84</item>
<item>85</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_117">
<Obj>
<type>3</type>
<id>105</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>14</count>
<item_version>0</item_version>
<item>90</item>
<item>91</item>
<item>92</item>
<item>93</item>
<item>94</item>
<item>95</item>
<item>96</item>
<item>97</item>
<item>98</item>
<item>99</item>
<item>100</item>
<item>101</item>
<item>102</item>
<item>104</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_118">
<Obj>
<type>3</type>
<id>113</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>7</count>
<item_version>0</item_version>
<item>106</item>
<item>107</item>
<item>108</item>
<item>109</item>
<item>110</item>
<item>111</item>
<item>112</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_119">
<Obj>
<type>3</type>
<id>115</id>
<name>.loopexit528</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>114</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_120">
<Obj>
<type>3</type>
<id>117</id>
<name>._crit_edge533</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>116</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>178</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_121">
<id>120</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>6</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_122">
<id>123</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>7</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_123">
<id>125</id>
<edge_type>1</edge_type>
<source_obj>124</source_obj>
<sink_obj>7</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_124">
<id>127</id>
<edge_type>1</edge_type>
<source_obj>126</source_obj>
<sink_obj>7</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_125">
<id>128</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>8</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_126">
<id>130</id>
<edge_type>1</edge_type>
<source_obj>129</source_obj>
<sink_obj>13</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_127">
<id>133</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>19</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_128">
<id>134</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>20</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_129">
<id>136</id>
<edge_type>1</edge_type>
<source_obj>135</source_obj>
<sink_obj>20</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_130">
<id>137</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>21</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_131">
<id>138</id>
<edge_type>2</edge_type>
<source_obj>40</source_obj>
<sink_obj>21</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_132">
<id>139</id>
<edge_type>2</edge_type>
<source_obj>117</source_obj>
<sink_obj>21</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_133">
<id>140</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_134">
<id>142</id>
<edge_type>1</edge_type>
<source_obj>141</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_135">
<id>143</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_136">
<id>144</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>25</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_137">
<id>145</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>25</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_138">
<id>148</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_139">
<id>150</id>
<edge_type>1</edge_type>
<source_obj>149</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_140">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>27</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_141">
<id>154</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>28</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_142">
<id>155</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>29</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_143">
<id>156</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>30</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_144">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>157</source_obj>
<sink_obj>30</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_145">
<id>159</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>31</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_146">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>160</source_obj>
<sink_obj>31</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_147">
<id>162</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>32</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_148">
<id>163</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>33</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_149">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>34</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_150">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>33</source_obj>
<sink_obj>35</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_151">
<id>166</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>35</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_152">
<id>167</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>36</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_153">
<id>168</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>37</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_154">
<id>169</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>37</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_155">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>38</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_156">
<id>171</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>38</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_157">
<id>172</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_158">
<id>173</id>
<edge_type>2</edge_type>
<source_obj>48</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_159">
<id>174</id>
<edge_type>2</edge_type>
<source_obj>115</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_160">
<id>175</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>41</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_161">
<id>176</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>41</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_162">
<id>177</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>42</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_163">
<id>178</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>43</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_164">
<id>179</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>44</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_165">
<id>181</id>
<edge_type>1</edge_type>
<source_obj>180</source_obj>
<sink_obj>44</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_166">
<id>183</id>
<edge_type>1</edge_type>
<source_obj>182</source_obj>
<sink_obj>44</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_167">
<id>184</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>45</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_168">
<id>185</id>
<edge_type>1</edge_type>
<source_obj>43</source_obj>
<sink_obj>45</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_169">
<id>186</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>46</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_170">
<id>187</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>46</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_171">
<id>188</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>47</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_172">
<id>190</id>
<edge_type>1</edge_type>
<source_obj>189</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_173">
<id>191</id>
<edge_type>2</edge_type>
<source_obj>48</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_174">
<id>192</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_175">
<id>193</id>
<edge_type>2</edge_type>
<source_obj>70</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_176">
<id>194</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>50</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_177">
<id>195</id>
<edge_type>1</edge_type>
<source_obj>50</source_obj>
<sink_obj>51</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_178">
<id>196</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>51</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_179">
<id>197</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>52</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_180">
<id>199</id>
<edge_type>1</edge_type>
<source_obj>198</source_obj>
<sink_obj>52</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_181">
<id>200</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>53</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_182">
<id>201</id>
<edge_type>2</edge_type>
<source_obj>78</source_obj>
<sink_obj>53</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_183">
<id>202</id>
<edge_type>2</edge_type>
<source_obj>60</source_obj>
<sink_obj>53</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_184">
<id>205</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>56</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_185">
<id>206</id>
<edge_type>1</edge_type>
<source_obj>56</source_obj>
<sink_obj>57</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_186">
<id>207</id>
<edge_type>1</edge_type>
<source_obj>56</source_obj>
<sink_obj>58</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_187">
<id>208</id>
<edge_type>1</edge_type>
<source_obj>57</source_obj>
<sink_obj>59</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_188">
<id>209</id>
<edge_type>2</edge_type>
<source_obj>78</source_obj>
<sink_obj>59</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_189">
<id>210</id>
<edge_type>2</edge_type>
<source_obj>70</source_obj>
<sink_obj>59</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_190">
<id>213</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>61</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_191">
<id>214</id>
<edge_type>1</edge_type>
<source_obj>61</source_obj>
<sink_obj>62</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_192">
<id>216</id>
<edge_type>1</edge_type>
<source_obj>215</source_obj>
<sink_obj>62</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_193">
<id>217</id>
<edge_type>1</edge_type>
<source_obj>58</source_obj>
<sink_obj>63</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_194">
<id>218</id>
<edge_type>1</edge_type>
<source_obj>62</source_obj>
<sink_obj>63</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_195">
<id>221</id>
<edge_type>1</edge_type>
<source_obj>61</source_obj>
<sink_obj>64</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_196">
<id>223</id>
<edge_type>1</edge_type>
<source_obj>222</source_obj>
<sink_obj>64</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_197">
<id>225</id>
<edge_type>1</edge_type>
<source_obj>224</source_obj>
<sink_obj>64</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_198">
<id>228</id>
<edge_type>1</edge_type>
<source_obj>64</source_obj>
<sink_obj>65</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_199">
<id>229</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>65</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_200">
<id>230</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>66</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_201">
<id>231</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>67</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_202">
<id>233</id>
<edge_type>1</edge_type>
<source_obj>232</source_obj>
<sink_obj>67</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_203">
<id>234</id>
<edge_type>1</edge_type>
<source_obj>66</source_obj>
<sink_obj>67</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_204">
<id>235</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>68</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_205">
<id>236</id>
<edge_type>1</edge_type>
<source_obj>67</source_obj>
<sink_obj>68</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_206">
<id>237</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>69</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_207">
<id>238</id>
<edge_type>1</edge_type>
<source_obj>50</source_obj>
<sink_obj>71</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_208">
<id>239</id>
<edge_type>2</edge_type>
<source_obj>60</source_obj>
<sink_obj>71</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_209">
<id>240</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>71</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_210">
<id>241</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>71</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_211">
<id>242</id>
<edge_type>1</edge_type>
<source_obj>71</source_obj>
<sink_obj>72</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_212">
<id>244</id>
<edge_type>1</edge_type>
<source_obj>243</source_obj>
<sink_obj>72</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_213">
<id>245</id>
<edge_type>1</edge_type>
<source_obj>71</source_obj>
<sink_obj>73</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_214">
<id>246</id>
<edge_type>1</edge_type>
<source_obj>72</source_obj>
<sink_obj>74</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_215">
<id>247</id>
<edge_type>1</edge_type>
<source_obj>73</source_obj>
<sink_obj>74</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_216">
<id>249</id>
<edge_type>1</edge_type>
<source_obj>248</source_obj>
<sink_obj>74</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_217">
<id>250</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>75</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_218">
<id>251</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>75</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_219">
<id>252</id>
<edge_type>1</edge_type>
<source_obj>75</source_obj>
<sink_obj>76</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_220">
<id>253</id>
<edge_type>2</edge_type>
<source_obj>86</source_obj>
<sink_obj>77</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_221">
<id>254</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>79</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_222">
<id>255</id>
<edge_type>2</edge_type>
<source_obj>78</source_obj>
<sink_obj>79</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_223">
<id>256</id>
<edge_type>1</edge_type>
<source_obj>101</source_obj>
<sink_obj>79</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_224">
<id>257</id>
<edge_type>2</edge_type>
<source_obj>105</source_obj>
<sink_obj>79</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_225">
<id>258</id>
<edge_type>1</edge_type>
<source_obj>189</source_obj>
<sink_obj>80</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_226">
<id>259</id>
<edge_type>2</edge_type>
<source_obj>78</source_obj>
<sink_obj>80</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_227">
<id>260</id>
<edge_type>1</edge_type>
<source_obj>84</source_obj>
<sink_obj>80</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_228">
<id>261</id>
<edge_type>2</edge_type>
<source_obj>105</source_obj>
<sink_obj>80</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_229">
<id>262</id>
<edge_type>1</edge_type>
<source_obj>80</source_obj>
<sink_obj>81</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_230">
<id>263</id>
<edge_type>1</edge_type>
<source_obj>81</source_obj>
<sink_obj>82</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_231">
<id>264</id>
<edge_type>1</edge_type>
<source_obj>71</source_obj>
<sink_obj>82</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_232">
<id>265</id>
<edge_type>1</edge_type>
<source_obj>80</source_obj>
<sink_obj>84</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_233">
<id>266</id>
<edge_type>1</edge_type>
<source_obj>198</source_obj>
<sink_obj>84</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_234">
<id>267</id>
<edge_type>1</edge_type>
<source_obj>82</source_obj>
<sink_obj>85</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_235">
<id>268</id>
<edge_type>2</edge_type>
<source_obj>113</source_obj>
<sink_obj>85</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_236">
<id>269</id>
<edge_type>2</edge_type>
<source_obj>105</source_obj>
<sink_obj>85</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_237">
<id>270</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>90</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_238">
<id>271</id>
<edge_type>1</edge_type>
<source_obj>80</source_obj>
<sink_obj>91</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_239">
<id>272</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>92</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_240">
<id>273</id>
<edge_type>1</edge_type>
<source_obj>232</source_obj>
<sink_obj>92</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_241">
<id>274</id>
<edge_type>1</edge_type>
<source_obj>91</source_obj>
<sink_obj>92</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_242">
<id>275</id>
<edge_type>1</edge_type>
<source_obj>92</source_obj>
<sink_obj>93</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_243">
<id>276</id>
<edge_type>1</edge_type>
<source_obj>93</source_obj>
<sink_obj>94</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_244">
<id>277</id>
<edge_type>1</edge_type>
<source_obj>90</source_obj>
<sink_obj>95</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_245">
<id>278</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>95</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_246">
<id>279</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>96</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_247">
<id>280</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>97</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_248">
<id>281</id>
<edge_type>1</edge_type>
<source_obj>96</source_obj>
<sink_obj>97</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_249">
<id>284</id>
<edge_type>1</edge_type>
<source_obj>97</source_obj>
<sink_obj>98</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_250">
<id>285</id>
<edge_type>1</edge_type>
<source_obj>149</source_obj>
<sink_obj>98</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_251">
<id>288</id>
<edge_type>1</edge_type>
<source_obj>97</source_obj>
<sink_obj>99</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_252">
<id>289</id>
<edge_type>1</edge_type>
<source_obj>94</source_obj>
<sink_obj>99</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_253">
<id>290</id>
<edge_type>1</edge_type>
<source_obj>180</source_obj>
<sink_obj>99</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_254">
<id>293</id>
<edge_type>1</edge_type>
<source_obj>97</source_obj>
<sink_obj>100</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_255">
<id>294</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>101</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_256">
<id>295</id>
<edge_type>1</edge_type>
<source_obj>160</source_obj>
<sink_obj>101</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_257">
<id>296</id>
<edge_type>1</edge_type>
<source_obj>101</source_obj>
<sink_obj>102</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_258">
<id>297</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>102</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_259">
<id>298</id>
<edge_type>2</edge_type>
<source_obj>86</source_obj>
<sink_obj>104</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_260">
<id>299</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>106</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_261">
<id>301</id>
<edge_type>1</edge_type>
<source_obj>300</source_obj>
<sink_obj>106</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_262">
<id>302</id>
<edge_type>1</edge_type>
<source_obj>106</source_obj>
<sink_obj>107</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_263">
<id>303</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>108</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_264">
<id>304</id>
<edge_type>1</edge_type>
<source_obj>107</source_obj>
<sink_obj>108</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_265">
<id>306</id>
<edge_type>1</edge_type>
<source_obj>108</source_obj>
<sink_obj>109</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_266">
<id>307</id>
<edge_type>1</edge_type>
<source_obj>149</source_obj>
<sink_obj>109</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_267">
<id>309</id>
<edge_type>1</edge_type>
<source_obj>108</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_268">
<id>310</id>
<edge_type>1</edge_type>
<source_obj>76</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_269">
<id>311</id>
<edge_type>1</edge_type>
<source_obj>180</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_270">
<id>313</id>
<edge_type>1</edge_type>
<source_obj>108</source_obj>
<sink_obj>111</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_271">
<id>314</id>
<edge_type>2</edge_type>
<source_obj>115</source_obj>
<sink_obj>112</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_272">
<id>315</id>
<edge_type>2</edge_type>
<source_obj>117</source_obj>
<sink_obj>114</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_273">
<id>451</id>
<edge_type>2</edge_type>
<source_obj>22</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_274">
<id>452</id>
<edge_type>2</edge_type>
<source_obj>22</source_obj>
<sink_obj>40</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_275">
<id>453</id>
<edge_type>2</edge_type>
<source_obj>40</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_276">
<id>454</id>
<edge_type>2</edge_type>
<source_obj>40</source_obj>
<sink_obj>48</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_277">
<id>455</id>
<edge_type>2</edge_type>
<source_obj>48</source_obj>
<sink_obj>54</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_278">
<id>456</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_279">
<id>457</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>78</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_280">
<id>458</id>
<edge_type>2</edge_type>
<source_obj>60</source_obj>
<sink_obj>70</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_281">
<id>459</id>
<edge_type>2</edge_type>
<source_obj>60</source_obj>
<sink_obj>78</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_282">
<id>460</id>
<edge_type>2</edge_type>
<source_obj>70</source_obj>
<sink_obj>54</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_283">
<id>461</id>
<edge_type>2</edge_type>
<source_obj>78</source_obj>
<sink_obj>86</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_284">
<id>462</id>
<edge_type>2</edge_type>
<source_obj>86</source_obj>
<sink_obj>105</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_285">
<id>463</id>
<edge_type>2</edge_type>
<source_obj>86</source_obj>
<sink_obj>113</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_286">
<id>464</id>
<edge_type>2</edge_type>
<source_obj>105</source_obj>
<sink_obj>86</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_287">
<id>465</id>
<edge_type>2</edge_type>
<source_obj>113</source_obj>
<sink_obj>115</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_288">
<id>466</id>
<edge_type>2</edge_type>
<source_obj>115</source_obj>
<sink_obj>117</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_289">
<id>467</id>
<edge_type>4</edge_type>
<source_obj>26</source_obj>
<sink_obj>27</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_290">
<id>468</id>
<edge_type>4</edge_type>
<source_obj>99</source_obj>
<sink_obj>100</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_291">
<id>469</id>
<edge_type>4</edge_type>
<source_obj>98</source_obj>
<sink_obj>99</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_292">
<id>470</id>
<edge_type>4</edge_type>
<source_obj>110</source_obj>
<sink_obj>111</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_293">
<id>471</id>
<edge_type>4</edge_type>
<source_obj>109</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_294">
<id>472</id>
<edge_type>4</edge_type>
<source_obj>26</source_obj>
<sink_obj>99</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_295">
<id>473</id>
<edge_type>4</edge_type>
<source_obj>27</source_obj>
<sink_obj>99</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_296">
<id>474</id>
<edge_type>4</edge_type>
<source_obj>28</source_obj>
<sink_obj>102</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_297">
<id>475</id>
<edge_type>4</edge_type>
<source_obj>27</source_obj>
<sink_obj>110</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_298">
<id>476</id>
<edge_type>4</edge_type>
<source_obj>56</source_obj>
<sink_obj>61</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>8</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_299">
<mId>1</mId>
<mTag>circ_buff_write_128</mTag>
<mType>0</mType>
<sub_regions>
<count>7</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>-1</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_300">
<mId>2</mId>
<mTag>Entry</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>3</count>
<item_version>0</item_version>
<item>22</item>
<item>40</item>
<item>48</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>9</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_301">
<mId>3</mId>
<mTag>fifo_read</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>3</count>
<item_version>0</item_version>
<item>54</item>
<item>60</item>
<item>70</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>-1</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_302">
<mId>4</mId>
<mTag>Region 1</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>78</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_303">
<mId>5</mId>
<mTag>gmem_write</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>86</item>
<item>105</item>
</basic_blocks>
<mII>1</mII>
<mDepth>8</mDepth>
<mMinTripCount>0</mMinTripCount>
<mMaxTripCount>32767</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>32773</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_304">
<mId>6</mId>
<mTag>Region 2</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>113</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>7</mMinLatency>
<mMaxLatency>7</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_305">
<mId>7</mId>
<mTag>Region 3</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>115</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_306">
<mId>8</mId>
<mTag>Return</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>117</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="-1"></fsm>
<res class_id="-1"></res>
<node_label_latency class_id="26" tracking_level="0" version="0">
<count>85</count>
<item_version>0</item_version>
<item class_id="27" tracking_level="0" version="0">
<first>6</first>
<second class_id="28" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>7</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>8</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>19</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>1</first>
<second>6</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>29</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>31</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>32</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>33</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>38</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>39</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>41</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>42</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>58</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>59</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>61</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>65</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>67</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>68</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>71</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>72</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>73</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>74</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>75</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>76</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>77</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>79</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>80</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>81</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>82</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>84</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>85</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>90</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>91</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>92</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>93</first>
<second>
<first>13</first>
<second>1</second>
</second>
</item>
<item>
<first>94</first>
<second>
<first>15</first>
<second>0</second>
</second>
</item>
<item>
<first>95</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>96</first>
<second>
<first>14</first>
<second>0</second>
</second>
</item>
<item>
<first>97</first>
<second>
<first>14</first>
<second>0</second>
</second>
</item>
<item>
<first>98</first>
<second>
<first>14</first>
<second>0</second>
</second>
</item>
<item>
<first>99</first>
<second>
<first>15</first>
<second>0</second>
</second>
</item>
<item>
<first>100</first>
<second>
<first>16</first>
<second>4</second>
</second>
</item>
<item>
<first>101</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>102</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>104</first>
<second>
<first>20</first>
<second>0</second>
</second>
</item>
<item>
<first>106</first>
<second>
<first>21</first>
<second>0</second>
</second>
</item>
<item>
<first>107</first>
<second>
<first>22</first>
<second>0</second>
</second>
</item>
<item>
<first>108</first>
<second>
<first>22</first>
<second>0</second>
</second>
</item>
<item>
<first>109</first>
<second>
<first>22</first>
<second>0</second>
</second>
</item>
<item>
<first>110</first>
<second>
<first>23</first>
<second>0</second>
</second>
</item>
<item>
<first>111</first>
<second>
<first>24</first>
<second>4</second>
</second>
</item>
<item>
<first>112</first>
<second>
<first>28</first>
<second>0</second>
</second>
</item>
<item>
<first>114</first>
<second>
<first>28</first>
<second>0</second>
</second>
</item>
<item>
<first>116</first>
<second>
<first>28</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="29" tracking_level="0" version="0">
<count>12</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="0" version="0">
<first>22</first>
<second class_id="31" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>0</first>
<second>9</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>9</first>
<second>9</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>10</first>
<second>10</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>10</first>
<second>10</second>
</second>
</item>
<item>
<first>70</first>
<second>
<first>10</first>
<second>11</second>
</second>
</item>
<item>
<first>78</first>
<second>
<first>11</first>
<second>11</second>
</second>
</item>
<item>
<first>86</first>
<second>
<first>12</first>
<second>12</second>
</second>
</item>
<item>
<first>105</first>
<second>
<first>12</first>
<second>19</second>
</second>
</item>
<item>
<first>113</first>
<second>
<first>13</first>
<second>20</second>
</second>
</item>
<item>
<first>115</first>
<second>
<first>20</first>
<second>20</second>
</second>
</item>
<item>
<first>117</first>
<second>
<first>20</first>
<second>20</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="1" version="0" object_id="_307">
<region_name>gmem_write</region_name>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>86</item>
<item>105</item>
</basic_blocks>
<nodes>
<count>0</count>
<item_version>0</item_version>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>8</region_type>
<interval>1</interval>
<pipe_depth>8</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="34" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="35" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="36" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>0</count>
<item_version>0</item_version>
</dp_reg_nodes>
<dp_regname_nodes>
<count>0</count>
<item_version>0</item_version>
</dp_regname_nodes>
<dp_reg_phi>
<count>0</count>
<item_version>0</item_version>
</dp_reg_phi>
<dp_regname_phi>
<count>0</count>
<item_version>0</item_version>
</dp_regname_phi>
<dp_port_io_nodes class_id="37" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_port_io_nodes>
<port2core class_id="38" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
-- TODO: maybe add examples of Ada with contracts
-- @see https://learn.adacore.com/
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . S T R I N G _ O P S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- NOTE: This package is obsolescent. It is no longer used by the compiler
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
pragma Compiler_Unit_Warning;
package body System.String_Ops is
----------------
-- Str_Concat --
----------------
function Str_Concat (X, Y : String) return String is
begin
if X'Length = 0 then
return Y;
else
declare
L : constant Natural := X'Length + Y'Length;
R : String (X'First .. X'First + L - 1);
begin
R (X'Range) := X;
R (X'First + X'Length .. R'Last) := Y;
return R;
end;
end if;
end Str_Concat;
-------------------
-- Str_Concat_CC --
-------------------
function Str_Concat_CC (X, Y : Character) return String is
R : String (1 .. 2);
begin
R (1) := X;
R (2) := Y;
return R;
end Str_Concat_CC;
-------------------
-- Str_Concat_CS --
-------------------
function Str_Concat_CS (X : Character; Y : String) return String is
R : String (1 .. Y'Length + 1);
begin
R (1) := X;
R (2 .. R'Last) := Y;
return R;
end Str_Concat_CS;
-------------------
-- Str_Concat_SC --
-------------------
function Str_Concat_SC (X : String; Y : Character) return String is
begin
if X'Length = 0 then
return (1 => Y);
else
declare
R : String (X'First .. X'Last + 1);
begin
R (X'Range) := X;
R (R'Last) := Y;
return R;
end;
end if;
end Str_Concat_SC;
end System.String_Ops;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- ADA.CONTAINERS.RED_BLACK_TREES.GENERIC_BOUNDED_SET_OPERATIONS --
-- --
-- B o d y --
-- --
-- Copyright (C) 2004-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with System; use type System.Address;
package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Set_Operations is
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
-----------------------
-- Local Subprograms --
-----------------------
function Copy (Source : Set_Type) return Set_Type;
----------
-- Copy --
----------
function Copy (Source : Set_Type) return Set_Type is
begin
return Target : Set_Type (Source.Length) do
Assign (Target => Target, Source => Source);
end return;
end Copy;
--------------------
-- Set_Difference --
--------------------
procedure Set_Difference (Target : in out Set_Type; Source : Set_Type) is
Tgt, Src : Count_Type;
TN : Nodes_Type renames Target.Nodes;
SN : Nodes_Type renames Source.Nodes;
Compare : Integer;
begin
if Target'Address = Source'Address then
TC_Check (Target.TC);
Tree_Operations.Clear_Tree (Target);
return;
end if;
if Source.Length = 0 then
return;
end if;
TC_Check (Target.TC);
Tgt := Target.First;
Src := Source.First;
loop
if Tgt = 0 then
exit;
end if;
if Src = 0 then
exit;
end if;
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock_Target : With_Lock (Target.TC'Unrestricted_Access);
Lock_Source : With_Lock (Source.TC'Unrestricted_Access);
begin
if Is_Less (TN (Tgt), SN (Src)) then
Compare := -1;
elsif Is_Less (SN (Src), TN (Tgt)) then
Compare := 1;
else
Compare := 0;
end if;
end;
if Compare < 0 then
Tgt := Tree_Operations.Next (Target, Tgt);
elsif Compare > 0 then
Src := Tree_Operations.Next (Source, Src);
else
declare
X : constant Count_Type := Tgt;
begin
Tgt := Tree_Operations.Next (Target, Tgt);
Tree_Operations.Delete_Node_Sans_Free (Target, X);
Tree_Operations.Free (Target, X);
end;
Src := Tree_Operations.Next (Source, Src);
end if;
end loop;
end Set_Difference;
function Set_Difference (Left, Right : Set_Type) return Set_Type is
begin
if Left'Address = Right'Address then
return S : Set_Type (0); -- Empty set
end if;
if Left.Length = 0 then
return S : Set_Type (0); -- Empty set
end if;
if Right.Length = 0 then
return Copy (Left);
end if;
return Result : Set_Type (Left.Length) do
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock_Left : With_Lock (Left.TC'Unrestricted_Access);
Lock_Right : With_Lock (Right.TC'Unrestricted_Access);
L_Node : Count_Type;
R_Node : Count_Type;
Dst_Node : Count_Type;
pragma Warnings (Off, Dst_Node);
begin
L_Node := Left.First;
R_Node := Right.First;
loop
if L_Node = 0 then
exit;
end if;
if R_Node = 0 then
while L_Node /= 0 loop
Insert_With_Hint
(Dst_Set => Result,
Dst_Hint => 0,
Src_Node => Left.Nodes (L_Node),
Dst_Node => Dst_Node);
L_Node := Tree_Operations.Next (Left, L_Node);
end loop;
exit;
end if;
if Is_Less (Left.Nodes (L_Node), Right.Nodes (R_Node)) then
Insert_With_Hint
(Dst_Set => Result,
Dst_Hint => 0,
Src_Node => Left.Nodes (L_Node),
Dst_Node => Dst_Node);
L_Node := Tree_Operations.Next (Left, L_Node);
elsif Is_Less (Right.Nodes (R_Node), Left.Nodes (L_Node)) then
R_Node := Tree_Operations.Next (Right, R_Node);
else
L_Node := Tree_Operations.Next (Left, L_Node);
R_Node := Tree_Operations.Next (Right, R_Node);
end if;
end loop;
end;
end return;
end Set_Difference;
----------------------
-- Set_Intersection --
----------------------
procedure Set_Intersection
(Target : in out Set_Type;
Source : Set_Type)
is
Tgt : Count_Type;
Src : Count_Type;
Compare : Integer;
begin
if Target'Address = Source'Address then
return;
end if;
TC_Check (Target.TC);
if Source.Length = 0 then
Tree_Operations.Clear_Tree (Target);
return;
end if;
Tgt := Target.First;
Src := Source.First;
while Tgt /= 0
and then Src /= 0
loop
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock_Target : With_Lock (Target.TC'Unrestricted_Access);
Lock_Source : With_Lock (Source.TC'Unrestricted_Access);
begin
if Is_Less (Target.Nodes (Tgt), Source.Nodes (Src)) then
Compare := -1;
elsif Is_Less (Source.Nodes (Src), Target.Nodes (Tgt)) then
Compare := 1;
else
Compare := 0;
end if;
end;
if Compare < 0 then
declare
X : constant Count_Type := Tgt;
begin
Tgt := Tree_Operations.Next (Target, Tgt);
Tree_Operations.Delete_Node_Sans_Free (Target, X);
Tree_Operations.Free (Target, X);
end;
elsif Compare > 0 then
Src := Tree_Operations.Next (Source, Src);
else
Tgt := Tree_Operations.Next (Target, Tgt);
Src := Tree_Operations.Next (Source, Src);
end if;
end loop;
while Tgt /= 0 loop
declare
X : constant Count_Type := Tgt;
begin
Tgt := Tree_Operations.Next (Target, Tgt);
Tree_Operations.Delete_Node_Sans_Free (Target, X);
Tree_Operations.Free (Target, X);
end;
end loop;
end Set_Intersection;
function Set_Intersection (Left, Right : Set_Type) return Set_Type is
begin
if Left'Address = Right'Address then
return Copy (Left);
end if;
return Result : Set_Type (Count_Type'Min (Left.Length, Right.Length)) do
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock_Left : With_Lock (Left.TC'Unrestricted_Access);
Lock_Right : With_Lock (Right.TC'Unrestricted_Access);
L_Node : Count_Type;
R_Node : Count_Type;
Dst_Node : Count_Type;
pragma Warnings (Off, Dst_Node);
begin
L_Node := Left.First;
R_Node := Right.First;
loop
if L_Node = 0 then
exit;
end if;
if R_Node = 0 then
exit;
end if;
if Is_Less (Left.Nodes (L_Node), Right.Nodes (R_Node)) then
L_Node := Tree_Operations.Next (Left, L_Node);
elsif Is_Less (Right.Nodes (R_Node), Left.Nodes (L_Node)) then
R_Node := Tree_Operations.Next (Right, R_Node);
else
Insert_With_Hint
(Dst_Set => Result,
Dst_Hint => 0,
Src_Node => Left.Nodes (L_Node),
Dst_Node => Dst_Node);
L_Node := Tree_Operations.Next (Left, L_Node);
R_Node := Tree_Operations.Next (Right, R_Node);
end if;
end loop;
end;
end return;
end Set_Intersection;
----------------
-- Set_Subset --
----------------
function Set_Subset
(Subset : Set_Type;
Of_Set : Set_Type) return Boolean
is
begin
if Subset'Address = Of_Set'Address then
return True;
end if;
if Subset.Length > Of_Set.Length then
return False;
end if;
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock_Subset : With_Lock (Subset.TC'Unrestricted_Access);
Lock_Of_Set : With_Lock (Of_Set.TC'Unrestricted_Access);
Subset_Node : Count_Type;
Set_Node : Count_Type;
begin
Subset_Node := Subset.First;
Set_Node := Of_Set.First;
loop
if Set_Node = 0 then
return Subset_Node = 0;
end if;
if Subset_Node = 0 then
return True;
end if;
if Is_Less (Subset.Nodes (Subset_Node),
Of_Set.Nodes (Set_Node))
then
return False;
end if;
if Is_Less (Of_Set.Nodes (Set_Node),
Subset.Nodes (Subset_Node))
then
Set_Node := Tree_Operations.Next (Of_Set, Set_Node);
else
Set_Node := Tree_Operations.Next (Of_Set, Set_Node);
Subset_Node := Tree_Operations.Next (Subset, Subset_Node);
end if;
end loop;
end;
end Set_Subset;
-----------------
-- Set_Overlap --
-----------------
function Set_Overlap (Left, Right : Set_Type) return Boolean is
begin
if Left'Address = Right'Address then
return Left.Length /= 0;
end if;
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock_Left : With_Lock (Left.TC'Unrestricted_Access);
Lock_Right : With_Lock (Right.TC'Unrestricted_Access);
L_Node : Count_Type;
R_Node : Count_Type;
begin
L_Node := Left.First;
R_Node := Right.First;
loop
if L_Node = 0
or else R_Node = 0
then
return False;
end if;
if Is_Less (Left.Nodes (L_Node), Right.Nodes (R_Node)) then
L_Node := Tree_Operations.Next (Left, L_Node);
elsif Is_Less (Right.Nodes (R_Node), Left.Nodes (L_Node)) then
R_Node := Tree_Operations.Next (Right, R_Node);
else
return True;
end if;
end loop;
end;
end Set_Overlap;
------------------------------
-- Set_Symmetric_Difference --
------------------------------
procedure Set_Symmetric_Difference
(Target : in out Set_Type;
Source : Set_Type)
is
Tgt : Count_Type;
Src : Count_Type;
New_Tgt_Node : Count_Type;
pragma Warnings (Off, New_Tgt_Node);
Compare : Integer;
begin
if Target'Address = Source'Address then
Tree_Operations.Clear_Tree (Target);
return;
end if;
Tgt := Target.First;
Src := Source.First;
loop
if Tgt = 0 then
while Src /= 0 loop
Insert_With_Hint
(Dst_Set => Target,
Dst_Hint => 0,
Src_Node => Source.Nodes (Src),
Dst_Node => New_Tgt_Node);
Src := Tree_Operations.Next (Source, Src);
end loop;
return;
end if;
if Src = 0 then
return;
end if;
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock_Target : With_Lock (Target.TC'Unrestricted_Access);
Lock_Source : With_Lock (Source.TC'Unrestricted_Access);
begin
if Is_Less (Target.Nodes (Tgt), Source.Nodes (Src)) then
Compare := -1;
elsif Is_Less (Source.Nodes (Src), Target.Nodes (Tgt)) then
Compare := 1;
else
Compare := 0;
end if;
end;
if Compare < 0 then
Tgt := Tree_Operations.Next (Target, Tgt);
elsif Compare > 0 then
Insert_With_Hint
(Dst_Set => Target,
Dst_Hint => Tgt,
Src_Node => Source.Nodes (Src),
Dst_Node => New_Tgt_Node);
Src := Tree_Operations.Next (Source, Src);
else
declare
X : constant Count_Type := Tgt;
begin
Tgt := Tree_Operations.Next (Target, Tgt);
Tree_Operations.Delete_Node_Sans_Free (Target, X);
Tree_Operations.Free (Target, X);
end;
Src := Tree_Operations.Next (Source, Src);
end if;
end loop;
end Set_Symmetric_Difference;
function Set_Symmetric_Difference
(Left, Right : Set_Type) return Set_Type
is
begin
if Left'Address = Right'Address then
return S : Set_Type (0); -- Empty set
end if;
if Right.Length = 0 then
return Copy (Left);
end if;
if Left.Length = 0 then
return Copy (Right);
end if;
return Result : Set_Type (Left.Length + Right.Length) do
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock_Left : With_Lock (Left.TC'Unrestricted_Access);
Lock_Right : With_Lock (Right.TC'Unrestricted_Access);
L_Node : Count_Type;
R_Node : Count_Type;
Dst_Node : Count_Type;
pragma Warnings (Off, Dst_Node);
begin
L_Node := Left.First;
R_Node := Right.First;
loop
if L_Node = 0 then
while R_Node /= 0 loop
Insert_With_Hint
(Dst_Set => Result,
Dst_Hint => 0,
Src_Node => Right.Nodes (R_Node),
Dst_Node => Dst_Node);
R_Node := Tree_Operations.Next (Right, R_Node);
end loop;
exit;
end if;
if R_Node = 0 then
while L_Node /= 0 loop
Insert_With_Hint
(Dst_Set => Result,
Dst_Hint => 0,
Src_Node => Left.Nodes (L_Node),
Dst_Node => Dst_Node);
L_Node := Tree_Operations.Next (Left, L_Node);
end loop;
exit;
end if;
if Is_Less (Left.Nodes (L_Node), Right.Nodes (R_Node)) then
Insert_With_Hint
(Dst_Set => Result,
Dst_Hint => 0,
Src_Node => Left.Nodes (L_Node),
Dst_Node => Dst_Node);
L_Node := Tree_Operations.Next (Left, L_Node);
elsif Is_Less (Right.Nodes (R_Node), Left.Nodes (L_Node)) then
Insert_With_Hint
(Dst_Set => Result,
Dst_Hint => 0,
Src_Node => Right.Nodes (R_Node),
Dst_Node => Dst_Node);
R_Node := Tree_Operations.Next (Right, R_Node);
else
L_Node := Tree_Operations.Next (Left, L_Node);
R_Node := Tree_Operations.Next (Right, R_Node);
end if;
end loop;
end;
end return;
end Set_Symmetric_Difference;
---------------
-- Set_Union --
---------------
procedure Set_Union (Target : in out Set_Type; Source : Set_Type) is
Hint : Count_Type := 0;
procedure Process (Node : Count_Type);
pragma Inline (Process);
procedure Iterate is new Tree_Operations.Generic_Iteration (Process);
-------------
-- Process --
-------------
procedure Process (Node : Count_Type) is
begin
Insert_With_Hint
(Dst_Set => Target,
Dst_Hint => Hint,
Src_Node => Source.Nodes (Node),
Dst_Node => Hint);
end Process;
-- Start of processing for Union
begin
if Target'Address = Source'Address then
return;
end if;
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock_Source : With_Lock (Source.TC'Unrestricted_Access);
begin
-- Note that there's no way to decide a priori whether the target has
-- enough capacity for the union with source. We cannot simply
-- compare the sum of the existing lengths to the capacity of the
-- target, because equivalent items from source are not included in
-- the union.
Iterate (Source);
end;
end Set_Union;
function Set_Union (Left, Right : Set_Type) return Set_Type is
begin
if Left'Address = Right'Address then
return Copy (Left);
end if;
if Left.Length = 0 then
return Copy (Right);
end if;
if Right.Length = 0 then
return Copy (Left);
end if;
return Result : Set_Type (Left.Length + Right.Length) do
declare
Lock_Left : With_Lock (Left.TC'Unrestricted_Access);
Lock_Right : With_Lock (Right.TC'Unrestricted_Access);
begin
Assign (Target => Result, Source => Left);
Insert_Right : declare
Hint : Count_Type := 0;
procedure Process (Node : Count_Type);
pragma Inline (Process);
procedure Iterate is
new Tree_Operations.Generic_Iteration (Process);
-------------
-- Process --
-------------
procedure Process (Node : Count_Type) is
begin
Insert_With_Hint
(Dst_Set => Result,
Dst_Hint => Hint,
Src_Node => Right.Nodes (Node),
Dst_Node => Hint);
end Process;
-- Start of processing for Insert_Right
begin
Iterate (Right);
end Insert_Right;
end;
end return;
end Set_Union;
end Ada.Containers.Red_Black_Trees.Generic_Bounded_Set_Operations;
|
function Diff (Left, Right : Image) return Float is
Offs_I : constant Integer := Right'First (1) - Left'First (1);
Offs_J : constant Integer := Right'First (2) - Left'First (2);
Sum : Count := 0;
begin
if Left'Length (1) /= Right'Length (1) or else Left'Length (2) /= Right'Length (2) then
raise Constraint_Error;
end if;
for I in Left'Range (1) loop
for J in Left'Range (2) loop
Sum := Sum + (Left (I, J) - Right (I + Offs_I, J + Offs_J));
end loop;
end loop;
return Float (Sum) / (3.0 * Float (Left'Length (1) * Left'Length (2)));
end Diff;
|
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2016 onox <denkpadje@gmail.com>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
with Orka.SIMD.SSE.Singles;
package Orka.SIMD.SSE4_1.Singles.Swizzle is
pragma Pure;
use Orka.SIMD.SSE.Singles;
function Blend (Left, Right : m128; Mask : Unsigned_32) return m128
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_blendps";
-- Select elements from two sources (Left and Right) using a constant mask
function Blend (Left, Right, Mask : m128) return m128
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_blendvps";
-- Select elements from two sources (Left and Right) using a variable mask
function Extract (Elements : m128; Mask : Unsigned_32) return Float_32
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vec_ext_v4sf";
function Insert (Left, Right : m128; Mask : Unsigned_32) return m128
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_insertps128";
-- Insert an element from Right into Left. Bits 6-7 of Mask
-- define the index of the source (Right), bits 4-5 define
-- the index of the destination (Left). Bits 0-3 define the
-- zero mask.
end Orka.SIMD.SSE4_1.Singles.Swizzle;
|
-- C87B39A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT:
-- A) AN OVERLOADED CALL CAN BE RESOLVED BECAUSE AN ALLOCATOR RETURNS
-- AN ACCESS TYPE WHOSE DESIGNATED TYPE IS THE TYPE REFERRED TO IN
-- THE ALLOCATOR.
--
-- B) IF THE NAME OF THE DESIGNATED TYPE IN AN ALLOCATOR DOES NOT
-- UNIQUELY DETERMINE THE ACCESS TYPE OF AN ALLOCATOR, THE CONTEXT
-- MUST DETERMINE THE TYPE.
-- JBG 1/30/84
WITH REPORT; USE REPORT;
PROCEDURE C87B39A IS
TYPE S IS (M, F);
TYPE R (D : S) IS
RECORD NULL; END RECORD;
SUBTYPE M1 IS R(M);
SUBTYPE M2 IS R(M);
TYPE ACC_M1 IS ACCESS M1;
TYPE ACC_M2 IS ACCESS M2;
TYPE ACC_BOOL IS ACCESS BOOLEAN;
TYPE ACC_ACC_M1 IS ACCESS ACC_M1;
TYPE WHICH IS (IS_M1, IS_M2, IS_BOOL);
PROCEDURE P (X : ACC_M1; RESOLUTION : WHICH) IS
BEGIN
IF RESOLUTION /= IS_M1 THEN
FAILED ("INCORRECT RESOLUTION -- ACC_M1");
END IF;
END P; -- ACC_M1
PROCEDURE P (X : ACC_M2; RESOLUTION : WHICH) IS
BEGIN
IF RESOLUTION /= IS_M2 THEN
FAILED ("INCORRECT RESOLUTION -- ACC_M2");
END IF;
END P; -- ACC_M2
PROCEDURE P (X : ACC_BOOL; RESOLUTION : WHICH) IS
BEGIN
IF RESOLUTION /= IS_BOOL THEN
FAILED ("INCORRECT RESOLUTION -- ACC_BOOL");
END IF;
END P; -- ACC_BOOL
PROCEDURE P (X : ACC_ACC_M1; RESOLUTION : WHICH) IS
BEGIN
FAILED ("INCORRECT RESOLUTION -- ACC_ACC_M1");
END P; -- ACC_ACC_M1
PROCEDURE Q (X : ACC_M1) IS
BEGIN
NULL;
END Q; -- ACC_M1
PROCEDURE Q (X : ACC_BOOL) IS
BEGIN
FAILED ("INCORRECT RESOLUTION -- ACC_BOOL: Q");
END Q; -- ACC_BOOL
BEGIN
TEST ("C87B39A", "OVERLOADING RESOLUTION FOR ALLOCATORS");
P (ACC_M1'(NEW R(M)), IS_M1); -- B
P (ACC_M2'(NEW M1), IS_M2); -- B
P (NEW BOOLEAN'(TRUE), IS_BOOL); -- A
Q (NEW M2); -- A
Q (NEW M1); -- A
Q (NEW R(M)); -- A
Q (NEW R'(D => M)); -- A
RESULT;
END C87B39A;
|
-- CD5014Y.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT AN ADDRESS CLAUSE CAN BE GIVEN IN THE VISIBLE PART
-- OF A GENERIC PACKAGE SPECIFICATION FOR A VARIABLE OF A FORMAL
-- PRIVATE TYPE, WHERE THE VARIABLE IS DECLARED IN THE VISIBLE PART
-- OF THE SPECIFICATION.
-- HISTORY:
-- BCB 10/08/87 CREATED ORIGINAL TEST.
-- PWB 05/11/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA'.
WITH SYSTEM; USE SYSTEM;
WITH SPPRT13; USE SPPRT13;
WITH REPORT; USE REPORT;
PROCEDURE CD5014Y IS
BEGIN
TEST ("CD5014Y", " AN ADDRESS CLAUSE CAN BE GIVEN " &
"IN THE VISIBLE PART OF A GENERIC PACKAGE " &
"SPECIFICATION FOR A VARIABLE OF A FORMAL " &
"PRIVATE TYPE, WHERE THE VARIABLE IS DECLARED " &
"IN THE VISIBLE PART OF THE SPECIFICATION");
DECLARE
GENERIC
TYPE FORM_PRIVATE_TYPE IS PRIVATE;
PACKAGE PKG IS
FORM_PRIVATE_OBJ1 : FORM_PRIVATE_TYPE;
FOR FORM_PRIVATE_OBJ1 USE
AT VARIABLE_ADDRESS;
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF FORM_PRIVATE_OBJ1'ADDRESS /= VARIABLE_ADDRESS THEN
FAILED ("INCORRECT ADDRESS FOR FORMAL PRIVATE " &
"VARIABLE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG(FORM_PRIVATE_TYPE => INTEGER);
BEGIN
NULL;
END;
RESULT;
END CD5014Y;
|
with impact.d3.collision.Algorithm.activating,
impact.d3.Manifold,
impact.d3.collision.manifold_Result,
impact.d3.Dispatcher,
impact.d3.Object,
impact.d3.collision.create_Func,
impact.d3.collision.Algorithm,
impact.d3.triangle_Callback;
package impact.d3.collision.Algorithm.activating.convex_concave
--
-- impact.d3.collision.Algorithm.activating.convex_concave supports collision between convex shapes and (concave) trianges meshes.
--
is
-- For each triangle in the concave mesh that overlaps with the AABB of a convex (m_convexProxy), processTriangle is called.
--
type btConvexTriangleCallback is new impact.d3.triangle_Callback.item with private;
function to_btConvexTriangleCallback (dispatcher : access impact.d3.Dispatcher.item'Class;
body0, body1 : access impact.d3.Object.item'Class;
isSwapped : in Boolean ) return btConvexTriangleCallback;
overriding procedure destruct (Self : in out btConvexTriangleCallback);
procedure setTimeStepAndCounters (Self : in out btConvexTriangleCallback; collisionMarginTriangle : in math.Real;
dispatchInfo : in impact.d3.Dispatcher.DispatcherInfo;
resultOut : access impact.d3.collision.manifold_Result.item);
overriding procedure processTriangle (Self : in out btConvexTriangleCallback; triangle : access math.Matrix_3x3;
partId : in Integer;
triangleIndex : in Integer);
procedure clearCache (Self : in out btConvexTriangleCallback);
function getAabbMin (Self : in btConvexTriangleCallback) return math.Vector_3;
function getAabbMax (Self : in btConvexTriangleCallback) return math.Vector_3;
function m_triangleCount (Self : in btConvexTriangleCallback) return Integer;
function m_manifoldPtr (Self : in btConvexTriangleCallback) return access impact.d3.Manifold.item'Class;
--- impact.d3.collision.Algorithm.activating.convex_concave
--
type Item is new impact.d3.collision.Algorithm.activating.item with private;
function to_convex_concave_Algorithm (ci : in AlgorithmConstructionInfo;
body0, body1 : access impact.d3.Object.item'Class;
isSwapped : in Boolean ) return Item'Class;
overriding procedure destruct (Self : in out Item);
overriding procedure processCollision (Self : in out Item; body0, body1 : access impact.d3.Object.item'Class;
dispatchInfo : in impact.d3.Dispatcher.DispatcherInfo;
resultOut : out impact.d3.collision.manifold_Result.item);
overriding function calculateTimeOfImpact (Self : in Item; body0, body1 : access impact.d3.Object.item'Class;
dispatchInfo : in impact.d3.Dispatcher.DispatcherInfo;
resultOut : access impact.d3.collision.manifold_Result.item) return math.Real;
overriding
procedure getAllContactManifolds (Self : in out Item; manifoldArray : out impact.d3.collision.Algorithm.btManifoldArray);
procedure clearCache (Self : in out Item);
--- Create Functions
--
type CreateFunc is new Create_Func.item with null record;
overriding
function CreateCollisionAlgorithm (Self : in CreateFunc; ci : in AlgorithmConstructionInfo;
body0, body1 : access impact.d3.Object.item'Class) return impact.d3.Dispatcher.Algorithm_view;
type SwappedCreateFunc is new Create_Func.item with null record;
overriding
function CreateCollisionAlgorithm (Self : in SwappedCreateFunc; ci : in AlgorithmConstructionInfo;
body0, body1 : access impact.d3.Object.item'Class) return impact.d3.Dispatcher.Algorithm_view;
private
type btConvexTriangleCallback is new impact.d3.triangle_Callback.item with
record
m_convexBody : access impact.d3.Object.item'Class;
m_triBody : access impact.d3.Object.item'Class;
m_aabbMin,
m_aabbMax : math.Vector_3;
m_resultOut : access impact.d3.collision.manifold_Result.item;
m_dispatcher : access impact.d3.Dispatcher.item'Class;
m_dispatchInfoPtr : access constant impact.d3.Dispatcher.DispatcherInfo;
m_collisionMarginTriangle : math.Real;
m_triangleCount : Integer;
m_manifoldPtr : access impact.d3.Manifold.item;
end record;
type Item is new impact.d3.collision.Algorithm.activating.item with
record
m_isSwapped : Boolean;
m_btConvexTriangleCallback : btConvexTriangleCallback;
end record;
end impact.d3.collision.Algorithm.activating.convex_concave;
|
-- Copyright (c) 2020 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package JWS.RS256 is
-- With this package to enable RS256 support
function Public_JWK
(Raw_Key : Ada.Streams.Stream_Element_Array)
return League.JSON.Objects.JSON_Object;
end JWS.RS256;
|
with Atomic.Critical_Section; use Atomic.Critical_Section;
with System;
package body Atomic.Unsigned
with SPARK_Mode => Off
is
----------
-- Load --
----------
function Load
(This : aliased Instance;
Order : Mem_Order := Seq_Cst)
return T
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
Result : T;
begin
Critical_Section.Enter (State);
Result := Vola;
Critical_Section.Leave (State);
return Result;
end Load;
-----------
-- Store --
-----------
procedure Store
(This : aliased in out Instance;
Val : T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Vola := Val;
Critical_Section.Leave (State);
end Store;
---------
-- Add --
---------
procedure Add (This : aliased in out Instance;
Val : T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Vola := Vola + Val;
Critical_Section.Leave (State);
end Add;
---------
-- Sub --
---------
procedure Sub (This : aliased in out Instance;
Val : T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Vola := Vola - Val;
Critical_Section.Leave (State);
end Sub;
------------
-- Op_And --
------------
procedure Op_And (This : aliased in out Instance;
Val : T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Vola := Vola and Val;
Critical_Section.Leave (State);
end Op_And;
------------
-- Op_XOR --
------------
procedure Op_XOR (This : aliased in out Instance;
Val : T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Vola := Vola xor Val;
Critical_Section.Leave (State);
end Op_XOR;
-----------
-- Op_OR --
-----------
procedure Op_OR (This : aliased in out Instance;
Val : T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Vola := Vola or Val;
Critical_Section.Leave (State);
end Op_OR;
----------
-- NAND --
----------
procedure NAND (This : aliased in out Instance;
Val : T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Vola := not (Vola and Val);
Critical_Section.Leave (State);
end NAND;
-- SPARK compatible --
--------------
-- Exchange --
--------------
procedure Exchange (This : aliased in out Instance;
Val : T;
Old : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Old := Vola;
Vola := Val;
Critical_Section.Leave (State);
end Exchange;
----------------------
-- Compare_Exchange --
----------------------
procedure Compare_Exchange (This : aliased in out Instance;
Expected : T;
Desired : T;
Weak : Boolean;
Success : out Boolean;
Success_Order : Mem_Order := Seq_Cst;
Failure_Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
if Vola = Expected then
Vola := Desired;
Success := True;
else
Success := False;
end if;
Critical_Section.Leave (State);
end Compare_Exchange;
---------------
-- Add_Fetch --
---------------
procedure Add_Fetch (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola + Val;
Vola := Result;
Critical_Section.Leave (State);
end Add_Fetch;
---------------
-- Sub_Fetch --
---------------
procedure Sub_Fetch (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola - Val;
Vola := Result;
Critical_Section.Leave (State);
end Sub_Fetch;
---------------
-- And_Fetch --
---------------
procedure And_Fetch (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola and Val;
Vola := Result;
Critical_Section.Leave (State);
end And_Fetch;
---------------
-- XOR_Fetch --
---------------
procedure XOR_Fetch (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola xor Val;
Vola := Result;
Critical_Section.Leave (State);
end XOR_Fetch;
--------------
-- OR_Fetch --
--------------
procedure OR_Fetch (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola or Val;
Vola := Result;
Critical_Section.Leave (State);
end OR_Fetch;
----------------
-- NAND_Fetch --
----------------
procedure NAND_Fetch (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := not (Vola and Val);
Vola := Result;
Critical_Section.Leave (State);
end NAND_Fetch;
---------------
-- Fetch_Add --
---------------
procedure Fetch_Add (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola;
Vola := Vola + Val;
Critical_Section.Leave (State);
end Fetch_Add;
---------------
-- Fetch_Sub --
---------------
procedure Fetch_Sub (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola;
Vola := Vola - Val;
Critical_Section.Leave (State);
end Fetch_Sub;
---------------
-- Fetch_And --
---------------
procedure Fetch_And (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola;
Vola := Vola and Val;
Critical_Section.Leave (State);
end Fetch_And;
---------------
-- Fetch_XOR --
---------------
procedure Fetch_XOR (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola;
Vola := Vola xor Val;
Critical_Section.Leave (State);
end Fetch_XOR;
--------------
-- Fetch_OR --
--------------
procedure Fetch_OR (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola;
Vola := Vola or Val;
Critical_Section.Leave (State);
end Fetch_OR;
----------------
-- Fetch_NAND --
----------------
procedure Fetch_NAND (This : aliased in out Instance;
Val : T;
Result : out T;
Order : Mem_Order := Seq_Cst)
is
Vola : T with Volatile, Address => This'Address;
State : Interrupt_State;
begin
Critical_Section.Enter (State);
Result := Vola;
Vola := not (Vola and Val);
Critical_Section.Leave (State);
end Fetch_NAND;
-- NOT SPARK Compatible --
--------------
-- Exchange --
--------------
function Exchange
(This : aliased in out Instance;
Val : T;
Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
Exchange (This, Val, Result, Order);
return Result;
end Exchange;
----------------------
-- Compare_Exchange --
----------------------
function Compare_Exchange
(This : aliased in out Instance;
Expected : T;
Desired : T;
Weak : Boolean;
Success_Order : Mem_Order := Seq_Cst;
Failure_Order : Mem_Order := Seq_Cst)
return Boolean
is
Result : Boolean;
begin
Compare_Exchange (This, Expected, Desired, Weak, Result, Success_Order,
Failure_Order);
return Result;
end Compare_Exchange;
---------------
-- Add_Fetch --
---------------
function Add_Fetch
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
Add_Fetch (This, Val, Result, Order);
return Result;
end Add_Fetch;
---------------
-- Sub_Fetch --
---------------
function Sub_Fetch
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
Sub_Fetch (This, Val, Result, Order);
return Result;
end Sub_Fetch;
---------------
-- And_Fetch --
---------------
function And_Fetch
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
And_Fetch (This, Val, Result, Order);
return Result;
end And_Fetch;
---------------
-- XOR_Fetch --
---------------
function XOR_Fetch
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
XOR_Fetch (This, Val, Result, Order);
return Result;
end XOR_Fetch;
--------------
-- OR_Fetch --
--------------
function OR_Fetch
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
OR_Fetch (This, Val, Result, Order);
return Result;
end OR_Fetch;
----------------
-- NAND_Fetch --
----------------
function NAND_Fetch
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
NAND_Fetch (This, Val, Result, Order);
return Result;
end NAND_Fetch;
---------------
-- Fetch_Add --
---------------
function Fetch_Add
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
Fetch_Add (This, Val, Result, Order);
return Result;
end Fetch_Add;
---------------
-- Fetch_Sub --
---------------
function Fetch_Sub
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
Fetch_Sub (This, Val, Result, Order);
return Result;
end Fetch_Sub;
---------------
-- Fetch_And --
---------------
function Fetch_And
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
Fetch_And (This, Val, Result, Order);
return Result;
end Fetch_And;
---------------
-- Fetch_XOR --
---------------
function Fetch_XOR
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
Fetch_XOR (This, Val, Result, Order);
return Result;
end Fetch_XOR;
--------------
-- Fetch_OR --
--------------
function Fetch_OR
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
Fetch_OR (This, Val, Result, Order);
return Result;
end Fetch_OR;
----------------
-- Fetch_NAND --
----------------
function Fetch_NAND
(This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst)
return T
is
Result : T;
begin
Fetch_NAND (This, Val, Result, Order);
return Result;
end Fetch_NAND;
end Atomic.Unsigned;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Elements.Generic_Hash;
function AMF.UML.Signal_Events.Hash is
new AMF.Elements.Generic_Hash (UML_Signal_Event, UML_Signal_Event_Access);
|
procedure Minimal is
begin
null;
end;
|
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_pbutils_pbutils_enumtypes_h is
-- unsupported macro: GST_TYPE_INSTALL_PLUGINS_RETURN (gst_install_plugins_return_get_type())
-- unsupported macro: GST_TYPE_DISCOVERER_RESULT (gst_discoverer_result_get_type())
-- enumerations from "install-plugins.h"
function gst_install_plugins_return_get_type return GLIB.GType; -- gst/pbutils/pbutils-enumtypes.h:12
pragma Import (C, gst_install_plugins_return_get_type, "gst_install_plugins_return_get_type");
-- enumerations from "gstdiscoverer.h"
function gst_discoverer_result_get_type return GLIB.GType; -- gst/pbutils/pbutils-enumtypes.h:16
pragma Import (C, gst_discoverer_result_get_type, "gst_discoverer_result_get_type");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_pbutils_pbutils_enumtypes_h;
|
-- Copyright (c) 2019-2020 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Unchecked_Conversion;
with Interfaces;
with AWS.Response;
with AWS.Client;
with AWS.Messages;
with League.IRIs;
with League.String_Vectors;
with Torrent.Contexts;
with Torrent.Logs;
with Torrent.Trackers;
with Torrent.UDP_Tracker_Protocol;
package body Torrent.Downloaders is
use type Ada.Streams.Stream_Element_Offset;
procedure Check_Stored_Pieces (Self : in out Downloader'Class);
procedure Send_Tracker_Request
(Self : in out Downloader'Class;
Event : Torrent.Trackers.Announcement_Kind);
procedure Send_Tracker_Request
(Self : in out Downloader'Class;
Event : Torrent.Trackers.Announcement_Kind;
Announce : League.IRIs.IRI;
Success : out Boolean);
procedure Send_UDP_Tracker_Request
(Self : in out Downloader'Class;
Event : Torrent.Trackers.Announcement_Kind;
Announce : League.Strings.Universal_String;
Success : out Boolean);
-------------------------
-- Check_Stored_Pieces --
-------------------------
procedure Check_Stored_Pieces (Self : in out Downloader'Class) is
begin
if not Self.Storage.Is_Empty_Storage then
for J in 1 .. Self.Piece_Count loop
if Connections.Is_Valid_Piece (Self.Meta, Self.Storage, J) then
Self.Tracked.Piece_Completed (J, True);
end if;
end loop;
end if;
end Check_Stored_Pieces;
---------------
-- Completed --
---------------
function Completed (Self : Downloader'Class)
return Torrent.Connections.Piece_Index_Array is
begin
return Self.Completed (1 .. Self.Last_Completed);
end Completed;
--------------------
-- Create_Session --
--------------------
function Create_Session
(Self : in out Downloader'Class;
Address : GNAT.Sockets.Sock_Addr_Type)
return Torrent.Connections.Connection_Access
is
Result : constant Torrent.Connections.Connection_Access :=
new Torrent.Connections.Connection
(Self.Meta,
Self'Unchecked_Access,
Self.Storage'Unchecked_Access,
Self.Meta.Piece_Count);
begin
Result.Initialize
(My_Id => Self.Peer_Id,
Peer => Address,
Listener => Self.Tracked'Unchecked_Access);
return Result;
end Create_Session;
----------------
-- Initialize --
----------------
procedure Initialize
(Self : in out Downloader'Class;
Peer : SHA1;
Path : League.Strings.Universal_String) is
begin
Self.Peer_Id := Peer;
Self.Port := Self.Context.Port;
Self.Left := 0;
Self.Downloaded := 0;
Self.Uploaded := 0;
Self.Last_Completed := 0;
Self.Storage.Initialize (Path);
Self.Tracked.Initialize
(Self.Meta.Piece_Length, Self.Meta.Last_Piece_Length);
for J in 1 .. Self.Meta.File_Count loop
Self.Left := Self.Left + Self.Meta.File_Length (J);
end loop;
Self.Check_Stored_Pieces;
pragma Debug
(Torrent.Logs.Enabled,
Torrent.Logs.Print ("Left bytes:" & (Self.Left'Img)));
end Initialize;
----------------
-- Is_Leacher --
----------------
function Is_Leacher (Self : Downloader'Class) return Boolean is
begin
return Self.Left > 0;
end Is_Leacher;
--------------------------
-- Send_Tracker_Request --
--------------------------
procedure Send_Tracker_Request
(Self : in out Downloader'Class;
Event : Torrent.Trackers.Announcement_Kind)
is
Success : Boolean := False;
List : constant Torrent.Metainfo_Files.String_Vector_Array :=
Self.Meta.Announce_List;
begin
if List'Length = 0 then
Self.Send_Tracker_Request
(Event, Self.Meta.Announce, Success);
else
for Item of List loop
for J in 1 .. Item.Length loop
declare
URL : constant League.Strings.Universal_String := Item (J);
begin
if URL.Starts_With ("udp://") then
Self.Send_UDP_Tracker_Request
(Event,
URL.Tail_From (7),
Success);
else
Self.Send_Tracker_Request
(Event,
League.IRIs.From_Universal_String (URL),
Success);
end if;
if Success then
return;
end if;
exception
when Constraint_Error =>
null;
end;
end loop;
end loop;
end if;
end Send_Tracker_Request;
--------------------------
-- Send_Tracker_Request --
--------------------------
procedure Send_Tracker_Request
(Self : in out Downloader'Class;
Event : Torrent.Trackers.Announcement_Kind;
Announce : League.IRIs.IRI;
Success : out Boolean)
is
URL : constant League.IRIs.IRI := Trackers.Event_URL
(Tracker => Announce,
Info_Hash => Self.Meta.Info_Hash,
Peer_Id => Self.Peer_Id,
Port => Self.Port,
Uploaded => Self.Uploaded,
Downloaded => Self.Downloaded,
Left => Self.Left,
Event => Event);
Reply : AWS.Response.Data;
begin
if Announce.Get_Scheme.To_Wide_Wide_String not in "http" | "https" then
Success := False;
return;
else
begin
Reply :=
AWS.Client.Get
(URL.To_Universal_String.To_UTF_8_String,
Follow_Redirection => True);
exception
when others =>
Success := False;
return;
end;
end if;
pragma Debug
(Torrent.Logs.Enabled,
Torrent.Logs.Print
("Tracker URL:" & URL.To_Universal_String.To_UTF_8_String));
if AWS.Response.Status_Code (Reply) not in AWS.Messages.Success then
pragma Debug
(Torrent.Logs.Enabled,
Torrent.Logs.Print
("Tracker request failed:"
& AWS.Messages.Status_Code'Image
(AWS.Response.Status_Code (Reply))));
pragma Debug
(Torrent.Logs.Enabled,
Torrent.Logs.Print (URL.To_Universal_String.To_UTF_8_String));
Success := False;
return;
elsif Self.Left = 0 or Event not in Torrent.Trackers.Started then
Success := True;
return;
end if;
declare
TR : constant Torrent.Trackers.Response :=
Trackers.Parse (AWS.Response.Message_Body (Reply));
begin
pragma Debug
(Torrent.Logs.Enabled,
Torrent.Logs.Print
("Peer_Count:" & (TR.Peer_Count'Img)));
for J in 1 .. TR.Peer_Count loop
declare
Address : constant GNAT.Sockets.Sock_Addr_Type :=
(Family => GNAT.Sockets.Family_Inet,
Addr => GNAT.Sockets.Inet_Addr
(TR.Peer_Address (J).To_UTF_8_String),
Port => GNAT.Sockets.Port_Type (TR.Peer_Port (J)));
begin
pragma Debug
(Torrent.Logs.Enabled,
Torrent.Logs.Print
((J'Img) & " /" & (TR.Peer_Count'Img)
& " Initialize connection to "
& TR.Peer_Address (J).To_UTF_8_String));
Self.Context.Connect (Self'Unchecked_Access, Address);
end;
end loop;
Success := True;
end;
end Send_Tracker_Request;
------------------------------
-- Send_UDP_Tracker_Request --
------------------------------
procedure Send_UDP_Tracker_Request
(Self : in out Downloader'Class;
Event : Torrent.Trackers.Announcement_Kind;
Announce : League.Strings.Universal_String;
Success : out Boolean)
is
use Torrent.UDP_Tracker_Protocol;
Colon : constant Natural := Announce.Last_Index (':');
Server : GNAT.Sockets.Socket_Type;
Addr : GNAT.Sockets.Sock_Addr_Type;
Connect_Req : constant Connect_Request :=
(Action => 0, Transaction_Id => 1234, Protocol_Id => <>);
Announce_Req : Announce_Request;
Buffer : Ada.Streams.Stream_Element_Array (1 .. 1600);
Last : Ada.Streams.Stream_Element_Count;
Connect : Interfaces.Unsigned_64;
begin
Success := False;
if Colon = 0 then
return;
else
begin
Addr.Addr := GNAT.Sockets.Inet_Addr
(Announce.Head_To (Colon - 1).To_UTF_8_String);
Addr.Port := GNAT.Sockets.Port_Type'Value
(Announce.Tail_From (Colon + 1).To_UTF_8_String);
exception
when Constraint_Error =>
return;
end;
end if;
GNAT.Sockets.Create_Socket
(Server, GNAT.Sockets.Family_Inet, GNAT.Sockets.Socket_Datagram);
GNAT.Sockets.Set_Socket_Option
(Server,
GNAT.Sockets.Socket_Level,
(GNAT.Sockets.Reuse_Address, True));
GNAT.Sockets.Set_Socket_Option
(Server,
GNAT.Sockets.Socket_Level,
(GNAT.Sockets.Receive_Timeout,
Timeout => 15.0));
GNAT.Sockets.Bind_Socket
(Server,
(GNAT.Sockets.Family_Inet,
GNAT.Sockets.Any_Inet_Addr,
GNAT.Sockets.Port_Type (Self.Port)));
begin
GNAT.Sockets.Send_Socket
(Server,
Cast (Connect_Req),
Last,
To => Addr);
pragma Assert (Last = Raw_Connect_Request'Last);
GNAT.Sockets.Receive_Socket (Server, Buffer, Last, Addr);
exception
when GNAT.Sockets.Socket_Error =>
return;
end;
if Last >= 16 then
declare
use type Interfaces.Unsigned_32;
Response : constant Connect_Response :=
Cast (Buffer (1 .. 16));
begin
if Response.Action /= Connect_Req.Action
or else Response.Transaction_Id /= Connect_Req.Transaction_Id
then
return;
else
Connect := Response.Connection_Id;
end if;
end;
else
return;
end if;
Announce_Req :=
(Connection_Id => Connect,
Action => 1, -- announce
Transaction_Id => 4321,
Info_Hash => Self.Meta.Info_Hash,
Peer_Id => Self.Peer_Id,
Downloaded => Interfaces.Unsigned_64 (Self.Downloaded),
Left => Interfaces.Unsigned_64 (Self.Left),
Uploaded => Interfaces.Unsigned_64 (Self.Uploaded),
Event => Cast_Event (Event),
IP_Address => <>,
Key => 0,
Num_Want => <>,
Port => Interfaces.Unsigned_16 (Self.Port));
begin
GNAT.Sockets.Send_Socket
(Server,
Cast (Announce_Req),
Last,
To => Addr);
pragma Assert (Last = Raw_Announce_Request'Last);
GNAT.Sockets.Receive_Socket (Server, Buffer, Last, Addr);
exception
when GNAT.Sockets.Socket_Error =>
return;
end;
if Last >= Raw_Announce_Response'Last then
declare
use type Interfaces.Unsigned_32;
Response : constant Announce_Response :=
Cast (Buffer (1 .. Raw_Announce_Response'Last));
begin
if Response.Action /= Announce_Req.Action
or else Response.Transaction_Id /= Announce_Req.Transaction_Id
then
return;
end if;
end;
else
return;
end if;
for J in 0 .. (Last - Raw_Announce_Response'Last) / 6 loop
declare
Peer : constant Peer_Address := Cast
(Buffer (21 + J * 6 .. 26 + J * 6));
X1 : constant String := Peer.IP_Address (1)'Image;
X2 : String := Peer.IP_Address (2)'Image;
X3 : String := Peer.IP_Address (3)'Image;
X4 : String := Peer.IP_Address (4)'Image;
Address : GNAT.Sockets.Sock_Addr_Type;
begin
X2 (1) := '.';
X3 (1) := '.';
X4 (1) := '.';
Address :=
(Family => GNAT.Sockets.Family_Inet,
Addr => GNAT.Sockets.Inet_Addr
(X1 (2 .. X1'Last) & X2 & X3 & X4),
Port => GNAT.Sockets.Port_Type (Peer.Port));
pragma Debug
(Torrent.Logs.Enabled,
Torrent.Logs.Print
((J'Img)
& " Initialize connection to "
& GNAT.Sockets.Image (Address)));
Self.Context.Connect (Self'Unchecked_Access, Address);
end;
end loop;
Success := True;
end Send_UDP_Tracker_Request;
-----------
-- Start --
-----------
procedure Start (Self : aliased in out Downloader'Class) is
begin
Self.Send_Tracker_Request (Torrent.Trackers.Started);
end Start;
----------
-- Stop --
----------
procedure Stop (Self : in out Downloader'Class) is
begin
Self.Send_Tracker_Request (Torrent.Trackers.Stopped);
end Stop;
------------
-- Update --
------------
procedure Update (Self : in out Downloader'Class) is
begin
Self.Send_Tracker_Request (Torrent.Trackers.Regular);
end Update;
--------------------
-- Tracked_Pieces --
--------------------
protected body Tracked_Pieces is
function Get_Piece_Size (Piece : Piece_Index) return Piece_Offset;
--------------------
-- Get_Piece_Size --
--------------------
function Get_Piece_Size (Piece : Piece_Index) return Piece_Offset is
begin
if Piece = Piece_Count then
return Last_Piece_Size;
else
return Piece_Size;
end if;
end Get_Piece_Size;
procedure Initialize
(Piece_Length : Piece_Offset;
Last_Piece_Length : Piece_Offset)
is
begin
Piece_Size := Piece_Length;
Last_Piece_Size := Last_Piece_Length;
end Initialize;
--------------------
-- Interval_Saved --
--------------------
procedure Interval_Saved
(Piece : Piece_Index;
Value : Torrent.Connections.Interval;
Last : out Boolean)
is
use type Torrent.Connections.Interval;
Cursor : constant Piece_State_Maps.Cursor := Finished.Find (Piece);
begin
Downloader.Downloaded := Downloader.Downloaded +
Value.To - Value.From + 1;
if Piece_State_Maps.Has_Element (Cursor) then
Torrent.Connections.Insert (Finished (Cursor), Value);
Last := Finished (Cursor).Last_Index = 1
and then Finished (Cursor).Last_Element =
(0, Get_Piece_Size (Piece) - 1);
return;
end if;
Finished.Insert
(Piece,
Torrent.Connections.Interval_Vectors.To_Vector
(Value, Length => 1));
Last := Value = (0, Get_Piece_Size (Piece) - 1);
end Interval_Saved;
---------------------
-- Piece_Completed --
---------------------
procedure Piece_Completed
(Piece : Piece_Index;
Ok : Boolean)
is
Is_Leecher : constant Boolean := Downloader.Left > 0;
begin
Our_Map (Piece) := Ok;
if Finished.Contains (Piece) then
Finished.Delete (Piece);
end if;
if Unfinished.Contains (Piece) then
Unfinished.Delete (Piece);
end if;
if Ok then
Downloader.Left := Downloader.Left - Get_Piece_Size (Piece);
Downloader.Completed (Downloader.Last_Completed + 1) := Piece;
Downloader.Last_Completed := Downloader.Last_Completed + 1;
if Is_Leecher and Downloader.Left = 0 then
-- FIXME It's bad to do blocking operation from protected type.
pragma Debug
(Torrent.Logs.Enabled,
Torrent.Logs.Print ("Download complete:"));
Downloader.Send_Tracker_Request (Torrent.Trackers.Completed);
end if;
end if;
end Piece_Completed;
-------------------
-- Interval_Sent --
-------------------
procedure Interval_Sent (Size : Piece_Offset) is
begin
Downloader.Uploaded := Downloader.Uploaded + Size;
end Interval_Sent;
-----------------------
-- Reserve_Intervals --
-----------------------
procedure Reserve_Intervals
(Map : Boolean_Array;
Value : out Torrent.Connections.Piece_State)
is
procedure Get_Intervals
(Item : in out Torrent.Connections.Interval_Vectors.Vector);
-------------------
-- Get_Intervals --
-------------------
procedure Get_Intervals
(Item : in out Torrent.Connections.Interval_Vectors.Vector) is
begin
while not Item.Is_Empty loop
declare
Last : Torrent.Connections.Interval :=
Item.Last_Element;
begin
while Last.To - Last.From + 1 > Max_Interval_Size loop
Value.Intervals.Append
((Last.From, Last.From + Max_Interval_Size - 1));
Last.From := Last.From + Max_Interval_Size;
if Value.Intervals.Last_Index >= 16 then
Item (Item.Last_Index) := Last;
return;
end if;
end loop;
Value.Intervals.Append (Last);
Item.Delete_Last;
end;
end loop;
end Get_Intervals;
begin
Value.Intervals.Clear;
for Item in Unfinished.Iterate loop
if not Unfinished (Item).Is_Empty
and then Map (Piece_State_Maps.Key (Item))
then
Value.Piece := Piece_State_Maps.Key (Item);
Get_Intervals (Unfinished (Item));
return;
end if;
end loop;
for J in Map'Range loop
if not Our_Map (J)
and then Map (J)
and then not Unfinished.Contains (J)
then
Unfinished.Insert
(J, Torrent.Connections.Interval_Vectors.To_Vector
((0, Get_Piece_Size (J) - 1), Length => 1));
Reserve_Intervals (Map, Value);
return;
end if;
end loop;
end Reserve_Intervals;
----------------------
-- We_Are_Intrested --
----------------------
function We_Are_Intrested
(Map : Boolean_Array) return Boolean is
begin
return (Map and not Our_Map) /= (1 .. Piece_Count => False);
end We_Are_Intrested;
-------------------------
-- Unreserve_Intervals --
-------------------------
procedure Unreserve_Intervals
(Value : Torrent.Connections.Piece_Interval_Array) is
begin
for J of Value loop
if Unfinished.Contains (J.Piece) then
Unfinished (J.Piece).Append (J.Span);
else
Unfinished.Insert
(J.Piece,
Torrent.Connections.Interval_Vectors.To_Vector (J.Span, 1));
end if;
end loop;
end Unreserve_Intervals;
end Tracked_Pieces;
end Torrent.Downloaders;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- G N A T . M D 5 --
-- --
-- S p e c --
-- --
-- Copyright (C) 2009-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package implements the MD5 Message-Digest Algorithm as described in
-- RFC 1321. The complete text of RFC 1321 can be found at:
-- http://www.ietf.org/rfc/rfc1321.txt
-- See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete
-- documentation.
with GNAT.Secure_Hashes.MD5;
with System;
package GNAT.MD5 is new GNAT.Secure_Hashes.H
(Block_Words => GNAT.Secure_Hashes.MD5.Block_Words,
State_Words => 4,
Hash_Words => 4,
Hash_Bit_Order => System.Low_Order_First,
Hash_State => GNAT.Secure_Hashes.MD5.Hash_State,
Initial_State => GNAT.Secure_Hashes.MD5.Initial_State,
Transform => GNAT.Secure_Hashes.MD5.Transform);
|
with
ada.Task_Identification;
package openGL.Tasks
--
-- Allow checking that a GL operation is called only in the GL renderer engine task.
--
is
Renderer_Task : ada.Task_Identification.Task_Id := ada.Task_Identification.null_Task_Id;
--
-- The current renderer task.
procedure check;
function check return Boolean;
--
-- Check if the calling task is the renderer task.
-- Otherwise, gives an assertion error.
end openGL.Tasks;
|
with Ada.Text_IO;
with Ada.Integer_Text_IO;
with Ada.Numerics.Elementary_Functions;
-- Copyright 2021 Melwyn Francis Carlo
procedure A046 is
use Ada.Text_IO;
use Ada.Integer_Text_IO;
use Ada.Numerics.Elementary_Functions;
-- File Reference: http://www.naturalnumbers.org/primes.html
Max_N : constant Integer := 1E5;
FT : File_Type;
Last_Index : Natural;
Prime_Num : String (1 .. 10);
File_Name : constant String := "problems/003/PrimeNumbers_Upto_1000000";
Primes_List : array (Integer range 1 .. Max_N) of Integer;
Smallest_Odd_Composite_Number : Integer := 0;
I, J : Integer;
B : Float;
Prime_Found : Boolean;
begin
Open (FT, In_File, File_Name);
while not End_Of_File (FT) loop
Get_Line (FT, Prime_Num, Last_Index);
if (Integer'Value (Prime_Num (1 .. Last_Index)) > Max_N) then
exit;
end if;
Primes_List (Integer'Value (Prime_Num (1 .. Last_Index))) := 1;
end loop;
Close (FT);
I := 35;
while I <= Max_N loop
if Primes_List (I) = 0 then
J := 2;
Prime_Found := False;
while J < I loop
if Primes_List (J) /= 0 then
B := Sqrt (Float (I - J) / 2.0);
if B = Float'Floor (B) then
Prime_Found := True;
exit;
end if;
end if;
J := J + 1;
end loop;
if not Prime_Found then
Smallest_Odd_Composite_Number := I;
exit;
end if;
end if;
I := I + 2;
end loop;
Put (Smallest_Odd_Composite_Number, Width => 0);
end A046;
|
pragma License (Unrestricted);
-- implementation unit required by compiler
package System.Fore is
pragma Pure;
-- required for Fixed'Fore by compiler (s-fore.ads)
function Fore (Lo, Hi : Long_Long_Float) return Natural;
end System.Fore;
|
--===========================================================================
--
-- This package is the root package for the EDC Client
--
--===========================================================================
--
-- Copyright 2021 (C) Holger Rodriguez
--
-- SPDX-License-Identifier: BSD-3-Clause
--
package Edc_Client is
--------------------------------------------------------------------------
-- This is the baud rate for the UART serial interface
SERIAL_BAUD_RATE : constant Natural := 115_200;
--------------------------------------------------------------------------
-- This type defines the callback procedure, which needs to be
-- provided for the communication to the dashboard for any
-- communication related procedures
--------------------------------------------------------------------------
type Transmit_Procedure is
access not null procedure (Control : String);
--------------------------------------------------------------------------
-- Initializes the client and must be called before any other procedure
-- in the EDC Client world for any communication
--------------------------------------------------------------------------
procedure Initialize (T : Transmit_Procedure);
--------------------------------------------------------------------------
-- Returns the status if the EDC Client has been initialized
--------------------------------------------------------------------------
function Initialized return Boolean;
private
--------------------------------------------------------------------------
-- Stores the call back procedure for any operation
--------------------------------------------------------------------------
Client_Transmitter : Transmit_Procedure;
--------------------------------------------------------------------------
-- The intermediate transmitter procedure to ensure, that the
-- flexbility is there for adjustments which should not propagate
-- into the client code
--------------------------------------------------------------------------
procedure Transmitter (Control : String);
end Edc_Client;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with League.Text_Codecs;
with Slim.Message_Visiters;
package body Slim.Messages.SETD is
List : constant Field_Description_Array :=
((Uint_8_Field, 1), -- Code
(Custom_Field, 1)); -- Value
-----------------
-- Get_Setting --
-----------------
not overriding function Get_Setting (Self : SETD_Message) return Setting is
begin
case Self.Data_8 (1) is
when 0 =>
return (Player_Name, Self.Player);
when others =>
return (Kind => Something_Else);
end case;
end Get_Setting;
----------
-- Read --
----------
overriding function Read
(Data : not null access
League.Stream_Element_Vectors.Stream_Element_Vector)
return SETD_Message is
begin
return Result : SETD_Message do
Read_Fields (Result, List, Data.all);
end return;
end Read;
-----------------------
-- Read_Custom_Field --
-----------------------
overriding procedure Read_Custom_Field
(Self : in out SETD_Message;
Index : Positive;
Input : in out Ada.Streams.Stream_Element_Offset;
Data : League.Stream_Element_Vectors.Stream_Element_Vector)
is
use type Interfaces.Unsigned_8;
use type Ada.Streams.Stream_Element_Offset;
Content : constant Ada.Streams.Stream_Element_Array (1 .. Data.Length) :=
Data.To_Stream_Element_Array;
begin
pragma Assert (Index = 1);
if Self.Data_8 (1) = 0 then -- player name
Self.Player := League.Text_Codecs.Codec_For_Application_Locale.Decode
(Content (Input .. Content'Last));
Input := Content'Last + 1;
elsif Self.Data_8 (1) = 4 then -- disable dac
Self.Value := Data.Element (Input);
Input := Input + 1;
else
raise Program_Error;
end if;
end Read_Custom_Field;
-----------
-- Visit --
-----------
overriding procedure Visit
(Self : not null access SETD_Message;
Visiter : in out Slim.Message_Visiters.Visiter'Class) is
begin
Visiter.SETD (Self);
end Visit;
-----------
-- Write --
-----------
overriding procedure Write
(Self : SETD_Message;
Tag : out Message_Tag;
Data : out League.Stream_Element_Vectors.Stream_Element_Vector) is
begin
Tag := "SETD";
Write_Fields (Self, List, Data);
end Write;
------------------------
-- Write_Custom_Field --
------------------------
overriding procedure Write_Custom_Field
(Self : SETD_Message;
Index : Positive;
Data : in out League.Stream_Element_Vectors.Stream_Element_Vector)
is
use type Interfaces.Unsigned_8;
begin
pragma Assert (Index = 1);
if Self.Data_8 (1) = 0 then -- player name
Data.Append
(League.Text_Codecs.Codec_For_Application_Locale.Encode
(Self.Player));
elsif Self.Data_8 (1) = 4 then -- disable dac
Data.Append (Self.Value);
else
raise Program_Error;
end if;
end Write_Custom_Field;
end Slim.Messages.SETD;
|
-- part of OpenGLAda, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"
private with GL.Low_Level;
package GL_Enums_Feedback is
pragma Preelaborate;
type Feed_Back_Mode is (Feed_Back_2D, Feed_back_3D , Color_3D,
Color_Texture_3D, Color_Texture_4D);
type Feed_Back_Token is (Pass_Through_Token, Point_Token, Line_Token,
Polygon_Token, Bitmap_Token, Draw_Pixel_Token,
Copy_Pixel_Token, Line_Reset_Token);
private
for Feed_Back_Mode use (Feed_Back_2D => 16#0600#,
Feed_back_3D => 16#0601#,
Color_3D => 16#0602#,
Color_Texture_3D => 16#0603#,
Color_Texture_4D => 16#0604#);
for Feed_Back_Mode'Size use GL.Low_Level.Enum'Size;
for Feed_Back_Token use (Pass_Through_Token => 16#0700#,
Point_Token => 16#0701#,
Line_Token => 16#0702#,
Polygon_Token => 16#0703#,
Bitmap_Token => 16#0704#,
Draw_Pixel_Token => 16#0705#,
Copy_Pixel_Token => 16#0706#,
Line_Reset_Token => 16#0707#);
for Feed_Back_Token'Size use GL.Low_Level.Enum'Size;
end GL_Enums_Feedback;
|
-- Copyright 2012-2015 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with System;
package Pck is
type Char_Table is array (Character range Character'First .. Character'Last)
of Natural;
Global_Char_Table : Char_Table := (others => 0);
procedure Do_Nothing (A : System.Address);
end Pck;
|
-- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with swig;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_glx_make_context_current_reply_t is
-- Item
--
type Item is record
response_type : aliased Interfaces.Unsigned_8;
pad0 : aliased Interfaces.Unsigned_8;
sequence : aliased Interfaces.Unsigned_16;
length : aliased Interfaces.Unsigned_32;
context_tag : aliased xcb.xcb_glx_context_tag_t;
pad1 : aliased swig.int8_t_Array (0 .. 19);
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_glx_make_context_current_reply_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_make_context_current_reply_t.Item,
Element_Array => xcb.xcb_glx_make_context_current_reply_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_glx_make_context_current_reply_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_make_context_current_reply_t.Pointer,
Element_Array => xcb.xcb_glx_make_context_current_reply_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_glx_make_context_current_reply_t;
|
-- POK header
--
-- The following file is a part of the POK project. Any modification should
-- be made according to the POK licence. You CANNOT use this file or a part
-- of a file for your own project.
--
-- For more information on the POK licence, please see our LICENCE FILE
--
-- Please follow the coding guidelines described in doc/CODING_GUIDELINES
--
-- Copyright (c) 2007-2020 POK team
with User;
use User;
package body Subprograms is
procedure Hello_Part1 is
begin
User.Hello_Part1 ();
end Hello_Part1;
end Subprograms;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 1 1 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Handling of packed arrays with Component_Size = 11
package System.Pack_11 is
pragma Preelaborate;
Bits : constant := 11;
type Bits_11 is mod 2 ** Bits;
for Bits_11'Size use Bits;
function Get_11 (Arr : System.Address; N : Natural) return Bits_11;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned.
procedure Set_11 (Arr : System.Address; N : Natural; E : Bits_11);
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is set to the given value.
end System.Pack_11;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . W I D E _ W I D E _ T E X T _ I O . C _ S T R E A M S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package provides an interface between Ada.Wide_Wide_Text_IO and the
-- C streams. This allows sharing of a stream between Ada and C or C++,
-- as well as allowing the Ada program to operate directly on the stream.
with Interfaces.C_Streams;
package Ada.Wide_Wide_Text_IO.C_Streams is
package ICS renames Interfaces.C_Streams;
function C_Stream (F : File_Type) return ICS.FILEs;
-- Obtain stream from existing open file
procedure Open
(File : in out File_Type;
Mode : File_Mode;
C_Stream : ICS.FILEs;
Form : String := "";
Name : String := "");
-- Create new file from existing stream
end Ada.Wide_Wide_Text_IO.C_Streams;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
package body Motor is
procedure Initialize;
-----------------------
-- Current_Direction --
-----------------------
function Current_Direction return Direction is
begin
case Current_Counter_Mode (Encoder_Timer) is
when Up => return Forward;
when Down => return Backward;
when others => raise Program_Error;
end case;
end Current_Direction;
-------------------
-- Encoder_Count --
-------------------
function Encoder_Count return UInt32 is
begin
return Current_Counter (Encoder_Timer);
end Encoder_Count;
----------------
-- Initialize --
----------------
procedure Initialize is
Configuration : GPIO_Port_Configuration;
begin
Enable_Clock (Encoder_Tach0);
Enable_Clock (Encoder_Tach1);
Enable_Clock (Encoder_Timer);
Configuration.Mode := Mode_AF;
Configuration.Output_Type := Push_Pull;
Configuration.Resistors := Pull_Up;
Configuration.Speed := Speed_100MHz;
Configure_IO (Encoder_Tach0, Configuration);
Configure_Alternate_Function (Encoder_Tach0, Encoder_AF);
Configure_IO (Encoder_Tach1, Configuration);
Configure_Alternate_Function (Encoder_Tach1, Encoder_AF);
Configure_Encoder_Interface
(Encoder_Timer,
Mode => Encoder_Mode_TI1_TI2,
IC1_Polarity => Rising,
IC2_Polarity => Rising);
Configure
(Encoder_Timer,
Prescaler => 0,
Period => UInt32 (UInt16'Last),
Clock_Divisor => Div1,
Counter_Mode => Up);
Configure_Channel_Input
(Encoder_Timer,
Channel => Channel_1,
Polarity => Rising,
Selection => Direct_TI,
Prescaler => Div1,
Filter => 0);
Configure_Channel_Input
(Encoder_Timer,
Channel => Channel_2,
Polarity => Rising,
Selection => Direct_TI,
Prescaler => Div1,
Filter => 0);
Enable_Channel (Encoder_Timer, Channel_1);
Enable_Channel (Encoder_Timer, Channel_2);
Set_Counter (Encoder_Timer, UInt16'(0));
Enable (Encoder_Timer);
end Initialize;
begin
Initialize;
end Motor;
|
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2020, Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
with SDL.Error;
with SDL.Video;
package body SDL.Video.Displays is
use type C.int;
function Total return Display_Indices is
-- This function returns a value >= 1, use this as a new lower type bound.
function SDL_Get_Num_Video_Displays return C.int with
Import => True,
Convention => C,
External_Name => "SDL_GetNumVideoDisplays";
Num : constant C.int := SDL_Get_Num_Video_Displays;
begin
if Num <= 0 then
raise Video_Error with SDL.Error.Get;
end if;
return Display_Indices (Num);
end Total;
function Closest_Mode (Display : in Display_Indices; Wanted : in Mode; Target : out Mode) return Boolean is
function SDL_Get_Closest_Display_Mode (D : C.int; W : in Mode; T : out Mode) return Access_Mode with
Import => True,
Convention => C,
External_Name => "SDL_GetClosestDisplayMode";
Result : Access_Mode := SDL_Get_Closest_Display_Mode (C.int (Display - 1), Wanted, Target);
begin
return (Result = null);
end Closest_Mode;
function Current_Mode (Display : in Display_Indices; Target : out Mode) return Boolean is
function SDL_Get_Current_Display_Mode (D : C.int; M : out Mode) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_GetCurrentDisplayMode";
Result : C.int := SDL_Get_Current_Display_Mode (C.int (Display - 1), Target);
begin
return (Result = Success);
end Current_Mode;
function Desktop_Mode (Display : in Display_Indices; Target : out Mode) return Boolean is
function SDL_Get_Desktop_Display_Mode (D : C.int; M : out Mode) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_GetDesktopDisplayMode";
Result : C.int := SDL_Get_Desktop_Display_Mode (C.int (Display - 1), Target);
begin
return (Result = Success);
end Desktop_Mode;
function Display_Mode (Display : in Display_Indices; Index : in Natural; Target : out Mode) return Boolean is
function SDL_Get_Display_Mode (D : in C.int; I : in C.int; T : out Mode) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_GetDisplayMode";
Result : C.int := SDL_Get_Display_Mode (C.int (Display - 1), C.int (Index), Target);
begin
return (Result = Success);
end Display_Mode;
function Total_Display_Modes (Display : in Display_Indices; Total : out Positive) return Boolean is
function SDL_Get_Num_Display_Modes (I : in C.int) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_GetNumDisplayModes";
Result : C.int := SDL_Get_Num_Display_Modes (C.int (Display - 1));
begin
if Result >= 1 then
Total := Positive (Result);
return True;
end if;
return False;
end Total_Display_Modes;
function Display_Bounds (Display : in Display_Indices; Bounds : out Rectangles.Rectangle) return Boolean is
function SDL_Get_Display_Bounds (D : in C.int; B : out Rectangles.Rectangle) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_GetDisplayBounds";
Result : C.int := SDL_Get_Display_Bounds (C.int (Display - 1), Bounds);
begin
return (Result = Success);
end Display_Bounds;
end SDL.Video.Displays;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2016-2020, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision: 5711 $ $Date: 2017-01-21 21:29:05 +0300 (Сб, 21 янв 2017) $
------------------------------------------------------------------------------
package body Web.Core.Connectables.Slots_0.Slots_1.Slots_2.Generic_Slots is
---------------------
-- Create_Slot_End --
---------------------
overriding function Create_Slot_End
(Self : Slot) return not null Slot_End_Access is
begin
-- return
-- new Slot_End'
-- (Next => null,
-- Previous => null,
-- Object => Self.Object.all'Unchecked_Access);
-- XXX A2JS: invalid code generated
return Result : not null Slot_End_Access
:= new Slot_End (Self.Object.all'Unchecked_Access)
do
Result.Next := null;
Result.Previous := null;
end return;
end Create_Slot_End;
------------
-- Invoke --
------------
overriding procedure Invoke
(Self : in out Slot_End;
Parameter_1 : Parameter_1_Type;
Parameter_2 : Parameter_2_Type) is
begin
Subprogram (Self.Object.all, Parameter_1, Parameter_2);
end Invoke;
-----------
-- Owner --
-----------
overriding function Owner
(Self : Slot_End) return not null Core.Connectables.Object_Access is
begin
return
Core.Connectables.Connectable_Object'Class
(Self.Object.all)'Unchecked_Access;
end Owner;
-------------
-- To_Slot --
-------------
function To_Slot
(Self : in out Abstract_Object'Class) return Slots_2.Slot'Class is
begin
-- return Slot'(Object => Self'Unchecked_Access);
-- XXX A2JS: invalid code generated
return Result : Slot (Self'Unchecked_Access);
end To_Slot;
end Web.Core.Connectables.Slots_0.Slots_1.Slots_2.Generic_Slots;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S T R I N G S . W I D E _ F I X E D --
-- --
-- S p e c --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Wide_Maps;
package Ada.Strings.Wide_Fixed is
pragma Preelaborate;
-------------------------------------------------------------------
-- Copy Procedure for Wide_Strings of Possibly Different Lengths --
-------------------------------------------------------------------
procedure Move
(Source : Wide_String;
Target : out Wide_String;
Drop : Truncation := Error;
Justify : Alignment := Left;
Pad : Wide_Character := Ada.Strings.Wide_Space);
------------------------
-- Search Subprograms --
------------------------
function Index
(Source : Wide_String;
Pattern : Wide_String;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural;
function Index
(Source : Wide_String;
Pattern : Wide_String;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
function Index
(Source : Wide_String;
Set : Wide_Maps.Wide_Character_Set;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
function Index
(Source : Wide_String;
Pattern : Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural;
pragma Ada_05 (Index);
function Index
(Source : Wide_String;
Pattern : Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
pragma Ada_05 (Index);
function Index
(Source : Wide_String;
Set : Wide_Maps.Wide_Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
pragma Ada_05 (Index);
function Index_Non_Blank
(Source : Wide_String;
Going : Direction := Forward) return Natural;
function Index_Non_Blank
(Source : Wide_String;
From : Positive;
Going : Direction := Forward) return Natural;
pragma Ada_05 (Index_Non_Blank);
function Count
(Source : Wide_String;
Pattern : Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural;
function Count
(Source : Wide_String;
Pattern : Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
function Count
(Source : Wide_String;
Set : Wide_Maps.Wide_Character_Set) return Natural;
procedure Find_Token
(Source : Wide_String;
Set : Wide_Maps.Wide_Character_Set;
From : Positive;
Test : Membership;
First : out Positive;
Last : out Natural);
pragma Ada_2012 (Find_Token);
procedure Find_Token
(Source : Wide_String;
Set : Wide_Maps.Wide_Character_Set;
Test : Membership;
First : out Positive;
Last : out Natural);
-----------------------------------------
-- Wide_String Translation Subprograms --
-----------------------------------------
function Translate
(Source : Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping) return Wide_String;
procedure Translate
(Source : in out Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping);
function Translate
(Source : Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Wide_String;
procedure Translate
(Source : in out Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping_Function);
--------------------------------------------
-- Wide_String Transformation Subprograms --
--------------------------------------------
function Replace_Slice
(Source : Wide_String;
Low : Positive;
High : Natural;
By : Wide_String) return Wide_String;
procedure Replace_Slice
(Source : in out Wide_String;
Low : Positive;
High : Natural;
By : Wide_String;
Drop : Truncation := Error;
Justify : Alignment := Left;
Pad : Wide_Character := Ada.Strings.Wide_Space);
function Insert
(Source : Wide_String;
Before : Positive;
New_Item : Wide_String) return Wide_String;
procedure Insert
(Source : in out Wide_String;
Before : Positive;
New_Item : Wide_String;
Drop : Truncation := Error);
function Overwrite
(Source : Wide_String;
Position : Positive;
New_Item : Wide_String) return Wide_String;
procedure Overwrite
(Source : in out Wide_String;
Position : Positive;
New_Item : Wide_String;
Drop : Truncation := Right);
function Delete
(Source : Wide_String;
From : Positive;
Through : Natural) return Wide_String;
procedure Delete
(Source : in out Wide_String;
From : Positive;
Through : Natural;
Justify : Alignment := Left;
Pad : Wide_Character := Ada.Strings.Wide_Space);
--------------------------------------
-- Wide_String Selector Subprograms --
--------------------------------------
function Trim
(Source : Wide_String;
Side : Trim_End) return Wide_String;
procedure Trim
(Source : in out Wide_String;
Side : Trim_End;
Justify : Alignment := Left;
Pad : Wide_Character := Wide_Space);
function Trim
(Source : Wide_String;
Left : Wide_Maps.Wide_Character_Set;
Right : Wide_Maps.Wide_Character_Set) return Wide_String;
procedure Trim
(Source : in out Wide_String;
Left : Wide_Maps.Wide_Character_Set;
Right : Wide_Maps.Wide_Character_Set;
Justify : Alignment := Ada.Strings.Left;
Pad : Wide_Character := Ada.Strings.Wide_Space);
function Head
(Source : Wide_String;
Count : Natural;
Pad : Wide_Character := Ada.Strings.Wide_Space) return Wide_String;
procedure Head
(Source : in out Wide_String;
Count : Natural;
Justify : Alignment := Left;
Pad : Wide_Character := Ada.Strings.Wide_Space);
function Tail
(Source : Wide_String;
Count : Natural;
Pad : Wide_Character := Ada.Strings.Wide_Space) return Wide_String;
procedure Tail
(Source : in out Wide_String;
Count : Natural;
Justify : Alignment := Left;
Pad : Wide_Character := Ada.Strings.Wide_Space);
---------------------------------------
-- Wide_String Constructor Functions --
---------------------------------------
function "*"
(Left : Natural;
Right : Wide_Character) return Wide_String;
function "*"
(Left : Natural;
Right : Wide_String) return Wide_String;
end Ada.Strings.Wide_Fixed;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P R J . T R E E --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Osint; use Osint;
with Prj.Env; use Prj.Env;
with Prj.Err;
with Ada.Unchecked_Deallocation;
package body Prj.Tree is
Node_With_Comments : constant array (Project_Node_Kind) of Boolean :=
(N_Project => True,
N_With_Clause => True,
N_Project_Declaration => False,
N_Declarative_Item => False,
N_Package_Declaration => True,
N_String_Type_Declaration => True,
N_Literal_String => False,
N_Attribute_Declaration => True,
N_Typed_Variable_Declaration => True,
N_Variable_Declaration => True,
N_Expression => False,
N_Term => False,
N_Literal_String_List => False,
N_Variable_Reference => False,
N_External_Value => False,
N_Attribute_Reference => False,
N_Case_Construction => True,
N_Case_Item => True,
N_Comment_Zones => True,
N_Comment => True);
-- Indicates the kinds of node that may have associated comments
package Next_End_Nodes is new Table.Table
(Table_Component_Type => Project_Node_Id,
Table_Index_Type => Natural,
Table_Low_Bound => 1,
Table_Initial => 10,
Table_Increment => 100,
Table_Name => "Next_End_Nodes");
-- A stack of nodes to indicates to what node the next "end" is associated
use Tree_Private_Part;
End_Of_Line_Node : Project_Node_Id := Empty_Node;
-- The node an end of line comment may be associated with
Previous_Line_Node : Project_Node_Id := Empty_Node;
-- The node an immediately following comment may be associated with
Previous_End_Node : Project_Node_Id := Empty_Node;
-- The node comments immediately following an "end" line may be
-- associated with.
Unkept_Comments : Boolean := False;
-- Set to True when some comments may not be associated with any node
function Comment_Zones_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
-- Returns the ID of the N_Comment_Zones node associated with node Node.
-- If there is not already an N_Comment_Zones node, create one and
-- associate it with node Node.
------------------
-- Add_Comments --
------------------
procedure Add_Comments
(To : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
Where : Comment_Location) is
Zone : Project_Node_Id := Empty_Node;
Previous : Project_Node_Id := Empty_Node;
begin
pragma Assert
(Present (To)
and then In_Tree.Project_Nodes.Table (To).Kind /= N_Comment);
Zone := In_Tree.Project_Nodes.Table (To).Comments;
if No (Zone) then
-- Create new N_Comment_Zones node
Project_Node_Table.Increment_Last (In_Tree.Project_Nodes);
In_Tree.Project_Nodes.Table
(Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
(Kind => N_Comment_Zones,
Qualifier => Unspecified,
Expr_Kind => Undefined,
Location => No_Location,
Directory => No_Path,
Variables => Empty_Node,
Packages => Empty_Node,
Pkg_Id => Empty_Package,
Name => No_Name,
Display_Name => No_Name,
Src_Index => 0,
Path_Name => No_Path,
Value => No_Name,
Default => Empty_Value,
Field1 => Empty_Node,
Field2 => Empty_Node,
Field3 => Empty_Node,
Field4 => Empty_Node,
Flag1 => False,
Flag2 => False,
Comments => Empty_Node);
Zone := Project_Node_Table.Last (In_Tree.Project_Nodes);
In_Tree.Project_Nodes.Table (To).Comments := Zone;
end if;
if Where = End_Of_Line then
In_Tree.Project_Nodes.Table (Zone).Value := Comments.Table (1).Value;
else
-- Get each comments in the Comments table and link them to node To
for J in 1 .. Comments.Last loop
-- Create new N_Comment node
if (Where = After or else Where = After_End)
and then Token /= Tok_EOF
and then Comments.Table (J).Follows_Empty_Line
then
Comments.Table (1 .. Comments.Last - J + 1) :=
Comments.Table (J .. Comments.Last);
Comments.Set_Last (Comments.Last - J + 1);
return;
end if;
Project_Node_Table.Increment_Last (In_Tree.Project_Nodes);
In_Tree.Project_Nodes.Table
(Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
(Kind => N_Comment,
Qualifier => Unspecified,
Expr_Kind => Undefined,
Flag1 => Comments.Table (J).Follows_Empty_Line,
Flag2 =>
Comments.Table (J).Is_Followed_By_Empty_Line,
Location => No_Location,
Directory => No_Path,
Variables => Empty_Node,
Packages => Empty_Node,
Pkg_Id => Empty_Package,
Name => No_Name,
Display_Name => No_Name,
Src_Index => 0,
Path_Name => No_Path,
Value => Comments.Table (J).Value,
Default => Empty_Value,
Field1 => Empty_Node,
Field2 => Empty_Node,
Field3 => Empty_Node,
Field4 => Empty_Node,
Comments => Empty_Node);
-- If this is the first comment, put it in the right field of
-- the node Zone.
if No (Previous) then
case Where is
when Before =>
In_Tree.Project_Nodes.Table (Zone).Field1 :=
Project_Node_Table.Last (In_Tree.Project_Nodes);
when After =>
In_Tree.Project_Nodes.Table (Zone).Field2 :=
Project_Node_Table.Last (In_Tree.Project_Nodes);
when Before_End =>
In_Tree.Project_Nodes.Table (Zone).Field3 :=
Project_Node_Table.Last (In_Tree.Project_Nodes);
when After_End =>
In_Tree.Project_Nodes.Table (Zone).Comments :=
Project_Node_Table.Last (In_Tree.Project_Nodes);
when End_Of_Line =>
null;
end case;
else
-- When it is not the first, link it to the previous one
In_Tree.Project_Nodes.Table (Previous).Comments :=
Project_Node_Table.Last (In_Tree.Project_Nodes);
end if;
-- This node becomes the previous one for the next comment, if
-- there is one.
Previous := Project_Node_Table.Last (In_Tree.Project_Nodes);
end loop;
end if;
-- Empty the Comments table, so that there is no risk to link the same
-- comments to another node.
Comments.Set_Last (0);
end Add_Comments;
--------------------------------
-- Associative_Array_Index_Of --
--------------------------------
function Associative_Array_Index_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Name_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference));
return In_Tree.Project_Nodes.Table (Node).Value;
end Associative_Array_Index_Of;
----------------------------
-- Associative_Package_Of --
----------------------------
function Associative_Package_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration));
return In_Tree.Project_Nodes.Table (Node).Field3;
end Associative_Package_Of;
----------------------------
-- Associative_Project_Of --
----------------------------
function Associative_Project_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration));
return In_Tree.Project_Nodes.Table (Node).Field2;
end Associative_Project_Of;
----------------------
-- Case_Insensitive --
----------------------
function Case_Insensitive
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Boolean
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference));
return In_Tree.Project_Nodes.Table (Node).Flag1;
end Case_Insensitive;
--------------------------------
-- Case_Variable_Reference_Of --
--------------------------------
function Case_Variable_Reference_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Case_Construction);
return In_Tree.Project_Nodes.Table (Node).Field1;
end Case_Variable_Reference_Of;
----------------------
-- Comment_Zones_Of --
----------------------
function Comment_Zones_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
Zone : Project_Node_Id;
begin
pragma Assert (Present (Node));
Zone := In_Tree.Project_Nodes.Table (Node).Comments;
-- If there is not already an N_Comment_Zones associated, create a new
-- one and associate it with node Node.
if No (Zone) then
Project_Node_Table.Increment_Last (In_Tree.Project_Nodes);
Zone := Project_Node_Table.Last (In_Tree.Project_Nodes);
In_Tree.Project_Nodes.Table (Zone) :=
(Kind => N_Comment_Zones,
Qualifier => Unspecified,
Location => No_Location,
Directory => No_Path,
Expr_Kind => Undefined,
Variables => Empty_Node,
Packages => Empty_Node,
Pkg_Id => Empty_Package,
Name => No_Name,
Display_Name => No_Name,
Src_Index => 0,
Path_Name => No_Path,
Value => No_Name,
Default => Empty_Value,
Field1 => Empty_Node,
Field2 => Empty_Node,
Field3 => Empty_Node,
Field4 => Empty_Node,
Flag1 => False,
Flag2 => False,
Comments => Empty_Node);
In_Tree.Project_Nodes.Table (Node).Comments := Zone;
end if;
return Zone;
end Comment_Zones_Of;
-----------------------
-- Current_Item_Node --
-----------------------
function Current_Item_Node
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Declarative_Item);
return In_Tree.Project_Nodes.Table (Node).Field1;
end Current_Item_Node;
------------------
-- Current_Term --
------------------
function Current_Term
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Term);
return In_Tree.Project_Nodes.Table (Node).Field1;
end Current_Term;
----------------
-- Default_Of --
----------------
function Default_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Attribute_Default_Value
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference);
return In_Tree.Project_Nodes.Table (Node).Default;
end Default_Of;
--------------------------
-- Default_Project_Node --
--------------------------
function Default_Project_Node
(In_Tree : Project_Node_Tree_Ref;
Of_Kind : Project_Node_Kind;
And_Expr_Kind : Variable_Kind := Undefined) return Project_Node_Id
is
Result : Project_Node_Id;
Zone : Project_Node_Id;
Previous : Project_Node_Id;
begin
-- Create new node with specified kind and expression kind
Project_Node_Table.Increment_Last (In_Tree.Project_Nodes);
In_Tree.Project_Nodes.Table
(Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
(Kind => Of_Kind,
Qualifier => Unspecified,
Location => No_Location,
Directory => No_Path,
Expr_Kind => And_Expr_Kind,
Variables => Empty_Node,
Packages => Empty_Node,
Pkg_Id => Empty_Package,
Name => No_Name,
Display_Name => No_Name,
Src_Index => 0,
Path_Name => No_Path,
Value => No_Name,
Default => Empty_Value,
Field1 => Empty_Node,
Field2 => Empty_Node,
Field3 => Empty_Node,
Field4 => Empty_Node,
Flag1 => False,
Flag2 => False,
Comments => Empty_Node);
-- Save the new node for the returned value
Result := Project_Node_Table.Last (In_Tree.Project_Nodes);
if Comments.Last > 0 then
-- If this is not a node with comments, then set the flag
if not Node_With_Comments (Of_Kind) then
Unkept_Comments := True;
elsif Of_Kind /= N_Comment and then Of_Kind /= N_Comment_Zones then
Project_Node_Table.Increment_Last (In_Tree.Project_Nodes);
In_Tree.Project_Nodes.Table
(Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
(Kind => N_Comment_Zones,
Qualifier => Unspecified,
Expr_Kind => Undefined,
Location => No_Location,
Directory => No_Path,
Variables => Empty_Node,
Packages => Empty_Node,
Pkg_Id => Empty_Package,
Name => No_Name,
Display_Name => No_Name,
Src_Index => 0,
Path_Name => No_Path,
Value => No_Name,
Default => Empty_Value,
Field1 => Empty_Node,
Field2 => Empty_Node,
Field3 => Empty_Node,
Field4 => Empty_Node,
Flag1 => False,
Flag2 => False,
Comments => Empty_Node);
Zone := Project_Node_Table.Last (In_Tree.Project_Nodes);
In_Tree.Project_Nodes.Table (Result).Comments := Zone;
Previous := Empty_Node;
for J in 1 .. Comments.Last loop
-- Create a new N_Comment node
Project_Node_Table.Increment_Last (In_Tree.Project_Nodes);
In_Tree.Project_Nodes.Table
(Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
(Kind => N_Comment,
Qualifier => Unspecified,
Expr_Kind => Undefined,
Flag1 => Comments.Table (J).Follows_Empty_Line,
Flag2 =>
Comments.Table (J).Is_Followed_By_Empty_Line,
Location => No_Location,
Directory => No_Path,
Variables => Empty_Node,
Packages => Empty_Node,
Pkg_Id => Empty_Package,
Name => No_Name,
Display_Name => No_Name,
Src_Index => 0,
Path_Name => No_Path,
Value => Comments.Table (J).Value,
Default => Empty_Value,
Field1 => Empty_Node,
Field2 => Empty_Node,
Field3 => Empty_Node,
Field4 => Empty_Node,
Comments => Empty_Node);
-- Link it to the N_Comment_Zones node, if it is the first,
-- otherwise to the previous one.
if No (Previous) then
In_Tree.Project_Nodes.Table (Zone).Field1 :=
Project_Node_Table.Last (In_Tree.Project_Nodes);
else
In_Tree.Project_Nodes.Table (Previous).Comments :=
Project_Node_Table.Last (In_Tree.Project_Nodes);
end if;
-- This new node will be the previous one for the next
-- N_Comment node, if there is one.
Previous := Project_Node_Table.Last (In_Tree.Project_Nodes);
end loop;
-- Empty the Comments table after all comments have been processed
Comments.Set_Last (0);
end if;
end if;
return Result;
end Default_Project_Node;
------------------
-- Directory_Of --
------------------
function Directory_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Path_Name_Type
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
return In_Tree.Project_Nodes.Table (Node).Directory;
end Directory_Of;
-------------------------
-- End_Of_Line_Comment --
-------------------------
function End_Of_Line_Comment
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Name_Id
is
Zone : Project_Node_Id := Empty_Node;
begin
pragma Assert (Present (Node));
Zone := In_Tree.Project_Nodes.Table (Node).Comments;
if No (Zone) then
return No_Name;
else
return In_Tree.Project_Nodes.Table (Zone).Value;
end if;
end End_Of_Line_Comment;
------------------------
-- Expression_Kind_Of --
------------------------
function Expression_Kind_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Variable_Kind
is
begin
pragma Assert
(Present (Node)
and then -- should use Nkind_In here ??? why not???
(In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Typed_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Expression
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Term
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Reference
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_External_Value));
return In_Tree.Project_Nodes.Table (Node).Expr_Kind;
end Expression_Kind_Of;
-------------------
-- Expression_Of --
-------------------
function Expression_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind =
N_Attribute_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Typed_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Variable_Declaration));
return In_Tree.Project_Nodes.Table (Node).Field1;
end Expression_Of;
-------------------------
-- Extended_Project_Of --
-------------------------
function Extended_Project_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project_Declaration);
return In_Tree.Project_Nodes.Table (Node).Field2;
end Extended_Project_Of;
------------------------------
-- Extended_Project_Path_Of --
------------------------------
function Extended_Project_Path_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Path_Name_Type
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
return Path_Name_Type (In_Tree.Project_Nodes.Table (Node).Value);
end Extended_Project_Path_Of;
--------------------------
-- Extending_Project_Of --
--------------------------
function Extending_Project_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project_Declaration);
return In_Tree.Project_Nodes.Table (Node).Field3;
end Extending_Project_Of;
---------------------------
-- External_Reference_Of --
---------------------------
function External_Reference_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_External_Value);
return In_Tree.Project_Nodes.Table (Node).Field1;
end External_Reference_Of;
-------------------------
-- External_Default_Of --
-------------------------
function External_Default_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref)
return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_External_Value);
return In_Tree.Project_Nodes.Table (Node).Field2;
end External_Default_Of;
------------------------
-- First_Case_Item_Of --
------------------------
function First_Case_Item_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Case_Construction);
return In_Tree.Project_Nodes.Table (Node).Field2;
end First_Case_Item_Of;
---------------------
-- First_Choice_Of --
---------------------
function First_Choice_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref)
return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Case_Item);
return In_Tree.Project_Nodes.Table (Node).Field1;
end First_Choice_Of;
-------------------------
-- First_Comment_After --
-------------------------
function First_Comment_After
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
Zone : Project_Node_Id := Empty_Node;
begin
pragma Assert (Present (Node));
Zone := In_Tree.Project_Nodes.Table (Node).Comments;
if No (Zone) then
return Empty_Node;
else
return In_Tree.Project_Nodes.Table (Zone).Field2;
end if;
end First_Comment_After;
-----------------------------
-- First_Comment_After_End --
-----------------------------
function First_Comment_After_End
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref)
return Project_Node_Id
is
Zone : Project_Node_Id := Empty_Node;
begin
pragma Assert (Present (Node));
Zone := In_Tree.Project_Nodes.Table (Node).Comments;
if No (Zone) then
return Empty_Node;
else
return In_Tree.Project_Nodes.Table (Zone).Comments;
end if;
end First_Comment_After_End;
--------------------------
-- First_Comment_Before --
--------------------------
function First_Comment_Before
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
Zone : Project_Node_Id := Empty_Node;
begin
pragma Assert (Present (Node));
Zone := In_Tree.Project_Nodes.Table (Node).Comments;
if No (Zone) then
return Empty_Node;
else
return In_Tree.Project_Nodes.Table (Zone).Field1;
end if;
end First_Comment_Before;
------------------------------
-- First_Comment_Before_End --
------------------------------
function First_Comment_Before_End
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
Zone : Project_Node_Id := Empty_Node;
begin
pragma Assert (Present (Node));
Zone := In_Tree.Project_Nodes.Table (Node).Comments;
if No (Zone) then
return Empty_Node;
else
return In_Tree.Project_Nodes.Table (Zone).Field3;
end if;
end First_Comment_Before_End;
-------------------------------
-- First_Declarative_Item_Of --
-------------------------------
function First_Declarative_Item_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Project_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Case_Item
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration));
if In_Tree.Project_Nodes.Table (Node).Kind = N_Project_Declaration then
return In_Tree.Project_Nodes.Table (Node).Field1;
else
return In_Tree.Project_Nodes.Table (Node).Field2;
end if;
end First_Declarative_Item_Of;
------------------------------
-- First_Expression_In_List --
------------------------------
function First_Expression_In_List
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String_List);
return In_Tree.Project_Nodes.Table (Node).Field1;
end First_Expression_In_List;
--------------------------
-- First_Literal_String --
--------------------------
function First_Literal_String
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind =
N_String_Type_Declaration);
return In_Tree.Project_Nodes.Table (Node).Field1;
end First_Literal_String;
----------------------
-- First_Package_Of --
----------------------
function First_Package_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Package_Declaration_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
return In_Tree.Project_Nodes.Table (Node).Packages;
end First_Package_Of;
--------------------------
-- First_String_Type_Of --
--------------------------
function First_String_Type_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
return In_Tree.Project_Nodes.Table (Node).Field3;
end First_String_Type_Of;
----------------
-- First_Term --
----------------
function First_Term
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Expression);
return In_Tree.Project_Nodes.Table (Node).Field1;
end First_Term;
-----------------------
-- First_Variable_Of --
-----------------------
function First_Variable_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Variable_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Project
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration));
return In_Tree.Project_Nodes.Table (Node).Variables;
end First_Variable_Of;
--------------------------
-- First_With_Clause_Of --
--------------------------
function First_With_Clause_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
return In_Tree.Project_Nodes.Table (Node).Field1;
end First_With_Clause_Of;
------------------------
-- Follows_Empty_Line --
------------------------
function Follows_Empty_Line
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Boolean
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Comment);
return In_Tree.Project_Nodes.Table (Node).Flag1;
end Follows_Empty_Line;
----------
-- Hash --
----------
function Hash (N : Project_Node_Id) return Header_Num is
begin
return Header_Num (N mod Project_Node_Id (Header_Num'Last));
end Hash;
----------------
-- Initialize --
----------------
procedure Initialize (Tree : Project_Node_Tree_Ref) is
begin
Project_Node_Table.Init (Tree.Project_Nodes);
Projects_Htable.Reset (Tree.Projects_HT);
end Initialize;
--------------------
-- Override_Flags --
--------------------
procedure Override_Flags
(Self : in out Environment;
Flags : Prj.Processing_Flags)
is
begin
Self.Flags := Flags;
end Override_Flags;
----------------
-- Initialize --
----------------
procedure Initialize
(Self : out Environment;
Flags : Processing_Flags)
is
begin
-- Do not reset the external references, in case we are reloading a
-- project, since we want to preserve the current environment. But we
-- still need to ensure that the external references are properly
-- initialized.
Prj.Ext.Initialize (Self.External);
Self.Flags := Flags;
end Initialize;
-------------------------
-- Initialize_And_Copy --
-------------------------
procedure Initialize_And_Copy
(Self : out Environment;
Copy_From : Environment)
is
begin
Self.Flags := Copy_From.Flags;
Prj.Ext.Initialize (Self.External, Copy_From => Copy_From.External);
Prj.Env.Copy (From => Copy_From.Project_Path, To => Self.Project_Path);
end Initialize_And_Copy;
----------
-- Free --
----------
procedure Free (Self : in out Environment) is
begin
Prj.Ext.Free (Self.External);
Free (Self.Project_Path);
end Free;
----------
-- Free --
----------
procedure Free (Proj : in out Project_Node_Tree_Ref) is
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Project_Node_Tree_Data, Project_Node_Tree_Ref);
begin
if Proj /= null then
Project_Node_Table.Free (Proj.Project_Nodes);
Projects_Htable.Reset (Proj.Projects_HT);
Unchecked_Free (Proj);
end if;
end Free;
-------------------------------
-- Is_Followed_By_Empty_Line --
-------------------------------
function Is_Followed_By_Empty_Line
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Boolean
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Comment);
return In_Tree.Project_Nodes.Table (Node).Flag2;
end Is_Followed_By_Empty_Line;
----------------------
-- Is_Extending_All --
----------------------
function Is_Extending_All
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Boolean
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Project
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause));
return In_Tree.Project_Nodes.Table (Node).Flag2;
end Is_Extending_All;
-------------------------
-- Is_Not_Last_In_List --
-------------------------
function Is_Not_Last_In_List
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Boolean
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause);
return In_Tree.Project_Nodes.Table (Node).Flag1;
end Is_Not_Last_In_List;
-------------------------------------
-- Imported_Or_Extended_Project_Of --
-------------------------------------
function Imported_Or_Extended_Project_Of
(Project : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
With_Name : Name_Id) return Project_Node_Id
is
With_Clause : Project_Node_Id;
Result : Project_Node_Id := Empty_Node;
Decl : Project_Node_Id;
begin
-- First check all the imported projects
With_Clause := First_With_Clause_Of (Project, In_Tree);
while Present (With_Clause) loop
-- Only non limited imported project may be used as prefix of
-- variables or attributes.
Result := Non_Limited_Project_Node_Of (With_Clause, In_Tree);
while Present (Result) loop
if Name_Of (Result, In_Tree) = With_Name then
return Result;
end if;
Decl := Project_Declaration_Of (Result, In_Tree);
-- Do not try to check for an extended project, if the project
-- does not have yet a project declaration.
exit when Decl = Empty_Node;
Result := Extended_Project_Of (Decl, In_Tree);
end loop;
With_Clause := Next_With_Clause_Of (With_Clause, In_Tree);
end loop;
-- If it is not an imported project, it might be an extended project
if No (With_Clause) then
Result := Project;
loop
Result :=
Extended_Project_Of
(Project_Declaration_Of (Result, In_Tree), In_Tree);
exit when No (Result)
or else Name_Of (Result, In_Tree) = With_Name;
end loop;
end if;
return Result;
end Imported_Or_Extended_Project_Of;
-------------
-- Kind_Of --
-------------
function Kind_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Kind
is
begin
pragma Assert (Present (Node));
return In_Tree.Project_Nodes.Table (Node).Kind;
end Kind_Of;
-----------------
-- Location_Of --
-----------------
function Location_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Source_Ptr
is
begin
pragma Assert (Present (Node));
return In_Tree.Project_Nodes.Table (Node).Location;
end Location_Of;
-------------
-- Name_Of --
-------------
function Name_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Name_Id
is
begin
pragma Assert (Present (Node));
return In_Tree.Project_Nodes.Table (Node).Name;
end Name_Of;
---------------------
-- Display_Name_Of --
---------------------
function Display_Name_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Name_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
return In_Tree.Project_Nodes.Table (Node).Display_Name;
end Display_Name_Of;
--------------------
-- Next_Case_Item --
--------------------
function Next_Case_Item
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Case_Item);
return In_Tree.Project_Nodes.Table (Node).Field3;
end Next_Case_Item;
------------------
-- Next_Comment --
------------------
function Next_Comment
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Comment);
return In_Tree.Project_Nodes.Table (Node).Comments;
end Next_Comment;
---------------------------
-- Next_Declarative_Item --
---------------------------
function Next_Declarative_Item
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Declarative_Item);
return In_Tree.Project_Nodes.Table (Node).Field2;
end Next_Declarative_Item;
-----------------------------
-- Next_Expression_In_List --
-----------------------------
function Next_Expression_In_List
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Expression);
return In_Tree.Project_Nodes.Table (Node).Field2;
end Next_Expression_In_List;
-------------------------
-- Next_Literal_String --
-------------------------
function Next_Literal_String
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref)
return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String);
return In_Tree.Project_Nodes.Table (Node).Field1;
end Next_Literal_String;
-----------------------------
-- Next_Package_In_Project --
-----------------------------
function Next_Package_In_Project
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration);
return In_Tree.Project_Nodes.Table (Node).Field3;
end Next_Package_In_Project;
----------------------
-- Next_String_Type --
----------------------
function Next_String_Type
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref)
return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind =
N_String_Type_Declaration);
return In_Tree.Project_Nodes.Table (Node).Field2;
end Next_String_Type;
---------------
-- Next_Term --
---------------
function Next_Term
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then In_Tree.Project_Nodes.Table (Node).Kind = N_Term);
return In_Tree.Project_Nodes.Table (Node).Field2;
end Next_Term;
-------------------
-- Next_Variable --
-------------------
function Next_Variable
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind =
N_Typed_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Variable_Declaration));
return In_Tree.Project_Nodes.Table (Node).Field3;
end Next_Variable;
-------------------------
-- Next_With_Clause_Of --
-------------------------
function Next_With_Clause_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause);
return In_Tree.Project_Nodes.Table (Node).Field2;
end Next_With_Clause_Of;
--------
-- No --
--------
function No (Node : Project_Node_Id) return Boolean is
begin
return Node = Empty_Node;
end No;
---------------------------------
-- Non_Limited_Project_Node_Of --
---------------------------------
function Non_Limited_Project_Node_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause));
return In_Tree.Project_Nodes.Table (Node).Field3;
end Non_Limited_Project_Node_Of;
-------------------
-- Package_Id_Of --
-------------------
function Package_Id_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Package_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration);
return In_Tree.Project_Nodes.Table (Node).Pkg_Id;
end Package_Id_Of;
---------------------
-- Package_Node_Of --
---------------------
function Package_Node_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Reference
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference));
return In_Tree.Project_Nodes.Table (Node).Field2;
end Package_Node_Of;
------------------
-- Path_Name_Of --
------------------
function Path_Name_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Path_Name_Type
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Project
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause));
return In_Tree.Project_Nodes.Table (Node).Path_Name;
end Path_Name_Of;
-------------
-- Present --
-------------
function Present (Node : Project_Node_Id) return Boolean is
begin
return Node /= Empty_Node;
end Present;
----------------------------
-- Project_Declaration_Of --
----------------------------
function Project_Declaration_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
return In_Tree.Project_Nodes.Table (Node).Field2;
end Project_Declaration_Of;
--------------------------
-- Project_Qualifier_Of --
--------------------------
function Project_Qualifier_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Qualifier
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
return In_Tree.Project_Nodes.Table (Node).Qualifier;
end Project_Qualifier_Of;
-----------------------
-- Parent_Project_Of --
-----------------------
function Parent_Project_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
return In_Tree.Project_Nodes.Table (Node).Field4;
end Parent_Project_Of;
-------------------------------------------
-- Project_File_Includes_Unkept_Comments --
-------------------------------------------
function Project_File_Includes_Unkept_Comments
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Boolean
is
Declaration : constant Project_Node_Id :=
Project_Declaration_Of (Node, In_Tree);
begin
return In_Tree.Project_Nodes.Table (Declaration).Flag1;
end Project_File_Includes_Unkept_Comments;
---------------------
-- Project_Node_Of --
---------------------
function Project_Node_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Reference
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference));
return In_Tree.Project_Nodes.Table (Node).Field1;
end Project_Node_Of;
-----------------------------------
-- Project_Of_Renamed_Package_Of --
-----------------------------------
function Project_Of_Renamed_Package_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration);
return In_Tree.Project_Nodes.Table (Node).Field1;
end Project_Of_Renamed_Package_Of;
--------------------------
-- Remove_Next_End_Node --
--------------------------
procedure Remove_Next_End_Node is
begin
Next_End_Nodes.Decrement_Last;
end Remove_Next_End_Node;
-----------------
-- Reset_State --
-----------------
procedure Reset_State is
begin
End_Of_Line_Node := Empty_Node;
Previous_Line_Node := Empty_Node;
Previous_End_Node := Empty_Node;
Unkept_Comments := False;
Comments.Set_Last (0);
end Reset_State;
----------------------
-- Restore_And_Free --
----------------------
procedure Restore_And_Free (S : in out Comment_State) is
procedure Unchecked_Free is new
Ada.Unchecked_Deallocation (Comment_Array, Comments_Ptr);
begin
End_Of_Line_Node := S.End_Of_Line_Node;
Previous_Line_Node := S.Previous_Line_Node;
Previous_End_Node := S.Previous_End_Node;
Next_End_Nodes.Set_Last (0);
Unkept_Comments := S.Unkept_Comments;
Comments.Set_Last (0);
for J in S.Comments'Range loop
Comments.Increment_Last;
Comments.Table (Comments.Last) := S.Comments (J);
end loop;
Unchecked_Free (S.Comments);
end Restore_And_Free;
----------
-- Save --
----------
procedure Save (S : out Comment_State) is
Cmts : constant Comments_Ptr := new Comment_Array (1 .. Comments.Last);
begin
for J in 1 .. Comments.Last loop
Cmts (J) := Comments.Table (J);
end loop;
S :=
(End_Of_Line_Node => End_Of_Line_Node,
Previous_Line_Node => Previous_Line_Node,
Previous_End_Node => Previous_End_Node,
Unkept_Comments => Unkept_Comments,
Comments => Cmts);
end Save;
----------
-- Scan --
----------
procedure Scan (In_Tree : Project_Node_Tree_Ref) is
Empty_Line : Boolean := False;
begin
-- If there are comments, then they will not be kept. Set the flag and
-- clear the comments.
if Comments.Last > 0 then
Unkept_Comments := True;
Comments.Set_Last (0);
end if;
-- Loop until a token other that End_Of_Line or Comment is found
loop
Prj.Err.Scanner.Scan;
case Token is
when Tok_End_Of_Line =>
if Prev_Token = Tok_End_Of_Line then
Empty_Line := True;
if Comments.Last > 0 then
Comments.Table (Comments.Last).Is_Followed_By_Empty_Line
:= True;
end if;
end if;
when Tok_Comment =>
-- If this is a line comment, add it to the comment table
if Prev_Token = Tok_End_Of_Line
or else Prev_Token = No_Token
then
Comments.Increment_Last;
Comments.Table (Comments.Last) :=
(Value => Comment_Id,
Follows_Empty_Line => Empty_Line,
Is_Followed_By_Empty_Line => False);
-- Otherwise, it is an end of line comment. If there is an
-- end of line node specified, associate the comment with
-- this node.
elsif Present (End_Of_Line_Node) then
declare
Zones : constant Project_Node_Id :=
Comment_Zones_Of (End_Of_Line_Node, In_Tree);
begin
In_Tree.Project_Nodes.Table (Zones).Value := Comment_Id;
end;
-- Otherwise, this end of line node cannot be kept
else
Unkept_Comments := True;
Comments.Set_Last (0);
end if;
Empty_Line := False;
when others =>
-- If there are comments, where the first comment is not
-- following an empty line, put the initial uninterrupted
-- comment zone with the node of the preceding line (either
-- a Previous_Line or a Previous_End node), if any.
if Comments.Last > 0 and then
not Comments.Table (1).Follows_Empty_Line
then
if Present (Previous_Line_Node) then
Add_Comments
(To => Previous_Line_Node,
Where => After,
In_Tree => In_Tree);
elsif Present (Previous_End_Node) then
Add_Comments
(To => Previous_End_Node,
Where => After_End,
In_Tree => In_Tree);
end if;
end if;
-- If there are still comments and the token is "end", then
-- put these comments with the Next_End node, if any;
-- otherwise, these comments cannot be kept. Always clear
-- the comments.
if Comments.Last > 0 and then Token = Tok_End then
if Next_End_Nodes.Last > 0 then
Add_Comments
(To => Next_End_Nodes.Table (Next_End_Nodes.Last),
Where => Before_End,
In_Tree => In_Tree);
else
Unkept_Comments := True;
end if;
Comments.Set_Last (0);
end if;
-- Reset the End_Of_Line, Previous_Line and Previous_End nodes
-- so that they are not used again.
End_Of_Line_Node := Empty_Node;
Previous_Line_Node := Empty_Node;
Previous_End_Node := Empty_Node;
-- And return
exit;
end case;
end loop;
end Scan;
------------------------------------
-- Set_Associative_Array_Index_Of --
------------------------------------
procedure Set_Associative_Array_Index_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Name_Id)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference));
In_Tree.Project_Nodes.Table (Node).Value := To;
end Set_Associative_Array_Index_Of;
--------------------------------
-- Set_Associative_Package_Of --
--------------------------------
procedure Set_Associative_Package_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration);
In_Tree.Project_Nodes.Table (Node).Field3 := To;
end Set_Associative_Package_Of;
--------------------------------
-- Set_Associative_Project_Of --
--------------------------------
procedure Set_Associative_Project_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind =
N_Attribute_Declaration));
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_Associative_Project_Of;
--------------------------
-- Set_Case_Insensitive --
--------------------------
procedure Set_Case_Insensitive
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Boolean)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference));
In_Tree.Project_Nodes.Table (Node).Flag1 := To;
end Set_Case_Insensitive;
------------------------------------
-- Set_Case_Variable_Reference_Of --
------------------------------------
procedure Set_Case_Variable_Reference_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Case_Construction);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_Case_Variable_Reference_Of;
---------------------------
-- Set_Current_Item_Node --
---------------------------
procedure Set_Current_Item_Node
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Declarative_Item);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_Current_Item_Node;
----------------------
-- Set_Current_Term --
----------------------
procedure Set_Current_Term
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Term);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_Current_Term;
--------------------
-- Set_Default_Of --
--------------------
procedure Set_Default_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Attribute_Default_Value)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference);
In_Tree.Project_Nodes.Table (Node).Default := To;
end Set_Default_Of;
----------------------
-- Set_Directory_Of --
----------------------
procedure Set_Directory_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Path_Name_Type)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
In_Tree.Project_Nodes.Table (Node).Directory := To;
end Set_Directory_Of;
---------------------
-- Set_End_Of_Line --
---------------------
procedure Set_End_Of_Line (To : Project_Node_Id) is
begin
End_Of_Line_Node := To;
end Set_End_Of_Line;
----------------------------
-- Set_Expression_Kind_Of --
----------------------------
procedure Set_Expression_Kind_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Variable_Kind)
is
begin
pragma Assert
(Present (Node)
and then -- should use Nkind_In here ??? why not???
(In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Typed_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Expression
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Term
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Reference
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_External_Value));
In_Tree.Project_Nodes.Table (Node).Expr_Kind := To;
end Set_Expression_Kind_Of;
-----------------------
-- Set_Expression_Of --
-----------------------
procedure Set_Expression_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind =
N_Attribute_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Typed_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Variable_Declaration));
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_Expression_Of;
-------------------------------
-- Set_External_Reference_Of --
-------------------------------
procedure Set_External_Reference_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_External_Value);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_External_Reference_Of;
-----------------------------
-- Set_External_Default_Of --
-----------------------------
procedure Set_External_Default_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_External_Value);
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_External_Default_Of;
----------------------------
-- Set_First_Case_Item_Of --
----------------------------
procedure Set_First_Case_Item_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Case_Construction);
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_First_Case_Item_Of;
-------------------------
-- Set_First_Choice_Of --
-------------------------
procedure Set_First_Choice_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Case_Item);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_First_Choice_Of;
-----------------------------
-- Set_First_Comment_After --
-----------------------------
procedure Set_First_Comment_After
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
Zone : constant Project_Node_Id := Comment_Zones_Of (Node, In_Tree);
begin
In_Tree.Project_Nodes.Table (Zone).Field2 := To;
end Set_First_Comment_After;
---------------------------------
-- Set_First_Comment_After_End --
---------------------------------
procedure Set_First_Comment_After_End
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
Zone : constant Project_Node_Id := Comment_Zones_Of (Node, In_Tree);
begin
In_Tree.Project_Nodes.Table (Zone).Comments := To;
end Set_First_Comment_After_End;
------------------------------
-- Set_First_Comment_Before --
------------------------------
procedure Set_First_Comment_Before
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
Zone : constant Project_Node_Id := Comment_Zones_Of (Node, In_Tree);
begin
In_Tree.Project_Nodes.Table (Zone).Field1 := To;
end Set_First_Comment_Before;
----------------------------------
-- Set_First_Comment_Before_End --
----------------------------------
procedure Set_First_Comment_Before_End
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
Zone : constant Project_Node_Id := Comment_Zones_Of (Node, In_Tree);
begin
In_Tree.Project_Nodes.Table (Zone).Field2 := To;
end Set_First_Comment_Before_End;
------------------------
-- Set_Next_Case_Item --
------------------------
procedure Set_Next_Case_Item
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Case_Item);
In_Tree.Project_Nodes.Table (Node).Field3 := To;
end Set_Next_Case_Item;
----------------------
-- Set_Next_Comment --
----------------------
procedure Set_Next_Comment
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Comment);
In_Tree.Project_Nodes.Table (Node).Comments := To;
end Set_Next_Comment;
-----------------------------------
-- Set_First_Declarative_Item_Of --
-----------------------------------
procedure Set_First_Declarative_Item_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Project_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Case_Item
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration));
if In_Tree.Project_Nodes.Table (Node).Kind = N_Project_Declaration then
In_Tree.Project_Nodes.Table (Node).Field1 := To;
else
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end if;
end Set_First_Declarative_Item_Of;
----------------------------------
-- Set_First_Expression_In_List --
----------------------------------
procedure Set_First_Expression_In_List
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String_List);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_First_Expression_In_List;
------------------------------
-- Set_First_Literal_String --
------------------------------
procedure Set_First_Literal_String
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind =
N_String_Type_Declaration);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_First_Literal_String;
--------------------------
-- Set_First_Package_Of --
--------------------------
procedure Set_First_Package_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Package_Declaration_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
In_Tree.Project_Nodes.Table (Node).Packages := To;
end Set_First_Package_Of;
------------------------------
-- Set_First_String_Type_Of --
------------------------------
procedure Set_First_String_Type_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
In_Tree.Project_Nodes.Table (Node).Field3 := To;
end Set_First_String_Type_Of;
--------------------
-- Set_First_Term --
--------------------
procedure Set_First_Term
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Expression);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_First_Term;
---------------------------
-- Set_First_Variable_Of --
---------------------------
procedure Set_First_Variable_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Variable_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Project
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration));
In_Tree.Project_Nodes.Table (Node).Variables := To;
end Set_First_Variable_Of;
------------------------------
-- Set_First_With_Clause_Of --
------------------------------
procedure Set_First_With_Clause_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_First_With_Clause_Of;
--------------------------
-- Set_Is_Extending_All --
--------------------------
procedure Set_Is_Extending_All
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Project
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause));
In_Tree.Project_Nodes.Table (Node).Flag2 := True;
end Set_Is_Extending_All;
-----------------------------
-- Set_Is_Not_Last_In_List --
-----------------------------
procedure Set_Is_Not_Last_In_List
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref)
is
begin
pragma Assert
(Present (Node)
and then In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause);
In_Tree.Project_Nodes.Table (Node).Flag1 := True;
end Set_Is_Not_Last_In_List;
-----------------
-- Set_Kind_Of --
-----------------
procedure Set_Kind_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Kind)
is
begin
pragma Assert (Present (Node));
In_Tree.Project_Nodes.Table (Node).Kind := To;
end Set_Kind_Of;
---------------------
-- Set_Location_Of --
---------------------
procedure Set_Location_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Source_Ptr)
is
begin
pragma Assert (Present (Node));
In_Tree.Project_Nodes.Table (Node).Location := To;
end Set_Location_Of;
-----------------------------
-- Set_Extended_Project_Of --
-----------------------------
procedure Set_Extended_Project_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project_Declaration);
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_Extended_Project_Of;
----------------------------------
-- Set_Extended_Project_Path_Of --
----------------------------------
procedure Set_Extended_Project_Path_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Path_Name_Type)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
In_Tree.Project_Nodes.Table (Node).Value := Name_Id (To);
end Set_Extended_Project_Path_Of;
------------------------------
-- Set_Extending_Project_Of --
------------------------------
procedure Set_Extending_Project_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project_Declaration);
In_Tree.Project_Nodes.Table (Node).Field3 := To;
end Set_Extending_Project_Of;
-----------------
-- Set_Name_Of --
-----------------
procedure Set_Name_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Name_Id)
is
begin
pragma Assert (Present (Node));
In_Tree.Project_Nodes.Table (Node).Name := To;
end Set_Name_Of;
-------------------------
-- Set_Display_Name_Of --
-------------------------
procedure Set_Display_Name_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Name_Id)
is
begin
pragma Assert
(Present (Node)
and then In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
In_Tree.Project_Nodes.Table (Node).Display_Name := To;
end Set_Display_Name_Of;
-------------------------------
-- Set_Next_Declarative_Item --
-------------------------------
procedure Set_Next_Declarative_Item
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Declarative_Item);
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_Next_Declarative_Item;
-----------------------
-- Set_Next_End_Node --
-----------------------
procedure Set_Next_End_Node (To : Project_Node_Id) is
begin
Next_End_Nodes.Increment_Last;
Next_End_Nodes.Table (Next_End_Nodes.Last) := To;
end Set_Next_End_Node;
---------------------------------
-- Set_Next_Expression_In_List --
---------------------------------
procedure Set_Next_Expression_In_List
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Expression);
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_Next_Expression_In_List;
-----------------------------
-- Set_Next_Literal_String --
-----------------------------
procedure Set_Next_Literal_String
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_Next_Literal_String;
---------------------------------
-- Set_Next_Package_In_Project --
---------------------------------
procedure Set_Next_Package_In_Project
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration);
In_Tree.Project_Nodes.Table (Node).Field3 := To;
end Set_Next_Package_In_Project;
--------------------------
-- Set_Next_String_Type --
--------------------------
procedure Set_Next_String_Type
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind =
N_String_Type_Declaration);
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_Next_String_Type;
-------------------
-- Set_Next_Term --
-------------------
procedure Set_Next_Term
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Term);
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_Next_Term;
-----------------------
-- Set_Next_Variable --
-----------------------
procedure Set_Next_Variable
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind =
N_Typed_Variable_Declaration
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Variable_Declaration));
In_Tree.Project_Nodes.Table (Node).Field3 := To;
end Set_Next_Variable;
-----------------------------
-- Set_Next_With_Clause_Of --
-----------------------------
procedure Set_Next_With_Clause_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause);
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_Next_With_Clause_Of;
-----------------------
-- Set_Package_Id_Of --
-----------------------
procedure Set_Package_Id_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Package_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration);
In_Tree.Project_Nodes.Table (Node).Pkg_Id := To;
end Set_Package_Id_Of;
-------------------------
-- Set_Package_Node_Of --
-------------------------
procedure Set_Package_Node_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Reference
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference));
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_Package_Node_Of;
----------------------
-- Set_Path_Name_Of --
----------------------
procedure Set_Path_Name_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Path_Name_Type)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Project
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause));
In_Tree.Project_Nodes.Table (Node).Path_Name := To;
end Set_Path_Name_Of;
---------------------------
-- Set_Previous_End_Node --
---------------------------
procedure Set_Previous_End_Node (To : Project_Node_Id) is
begin
Previous_End_Node := To;
end Set_Previous_End_Node;
----------------------------
-- Set_Previous_Line_Node --
----------------------------
procedure Set_Previous_Line_Node (To : Project_Node_Id) is
begin
Previous_Line_Node := To;
end Set_Previous_Line_Node;
--------------------------------
-- Set_Project_Declaration_Of --
--------------------------------
procedure Set_Project_Declaration_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end Set_Project_Declaration_Of;
------------------------------
-- Set_Project_Qualifier_Of --
------------------------------
procedure Set_Project_Qualifier_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Qualifier)
is
begin
pragma Assert
(Present (Node)
and then In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
In_Tree.Project_Nodes.Table (Node).Qualifier := To;
end Set_Project_Qualifier_Of;
---------------------------
-- Set_Parent_Project_Of --
---------------------------
procedure Set_Parent_Project_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
In_Tree.Project_Nodes.Table (Node).Field4 := To;
end Set_Parent_Project_Of;
-----------------------------------------------
-- Set_Project_File_Includes_Unkept_Comments --
-----------------------------------------------
procedure Set_Project_File_Includes_Unkept_Comments
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Boolean)
is
Declaration : constant Project_Node_Id :=
Project_Declaration_Of (Node, In_Tree);
begin
In_Tree.Project_Nodes.Table (Declaration).Flag1 := To;
end Set_Project_File_Includes_Unkept_Comments;
-------------------------
-- Set_Project_Node_Of --
-------------------------
procedure Set_Project_Node_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id;
Limited_With : Boolean := False)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Reference
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Attribute_Reference));
In_Tree.Project_Nodes.Table (Node).Field1 := To;
if In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause
and then not Limited_With
then
In_Tree.Project_Nodes.Table (Node).Field3 := To;
end if;
end Set_Project_Node_Of;
---------------------------------------
-- Set_Project_Of_Renamed_Package_Of --
---------------------------------------
procedure Set_Project_Of_Renamed_Package_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
In_Tree.Project_Nodes.Table (Node).Kind = N_Package_Declaration);
In_Tree.Project_Nodes.Table (Node).Field1 := To;
end Set_Project_Of_Renamed_Package_Of;
-------------------------
-- Set_Source_Index_Of --
-------------------------
procedure Set_Source_Index_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Int)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Attribute_Declaration));
In_Tree.Project_Nodes.Table (Node).Src_Index := To;
end Set_Source_Index_Of;
------------------------
-- Set_String_Type_Of --
------------------------
procedure Set_String_Type_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Project_Node_Id)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind =
N_Variable_Reference
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Typed_Variable_Declaration)
and then
In_Tree.Project_Nodes.Table (To).Kind = N_String_Type_Declaration);
if In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Reference then
In_Tree.Project_Nodes.Table (Node).Field3 := To;
else
In_Tree.Project_Nodes.Table (Node).Field2 := To;
end if;
end Set_String_Type_Of;
-------------------------
-- Set_String_Value_Of --
-------------------------
procedure Set_String_Value_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
To : Name_Id)
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Comment
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String));
In_Tree.Project_Nodes.Table (Node).Value := To;
end Set_String_Value_Of;
---------------------
-- Source_Index_Of --
---------------------
function Source_Index_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Int
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Attribute_Declaration));
return In_Tree.Project_Nodes.Table (Node).Src_Index;
end Source_Index_Of;
--------------------
-- String_Type_Of --
--------------------
function String_Type_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind =
N_Variable_Reference
or else
In_Tree.Project_Nodes.Table (Node).Kind =
N_Typed_Variable_Declaration));
if In_Tree.Project_Nodes.Table (Node).Kind = N_Variable_Reference then
return In_Tree.Project_Nodes.Table (Node).Field3;
else
return In_Tree.Project_Nodes.Table (Node).Field2;
end if;
end String_Type_Of;
---------------------
-- String_Value_Of --
---------------------
function String_Value_Of
(Node : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref) return Name_Id
is
begin
pragma Assert
(Present (Node)
and then
(In_Tree.Project_Nodes.Table (Node).Kind = N_With_Clause
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Comment
or else
In_Tree.Project_Nodes.Table (Node).Kind = N_Literal_String));
return In_Tree.Project_Nodes.Table (Node).Value;
end String_Value_Of;
--------------------
-- Value_Is_Valid --
--------------------
function Value_Is_Valid
(For_Typed_Variable : Project_Node_Id;
In_Tree : Project_Node_Tree_Ref;
Value : Name_Id) return Boolean
is
begin
pragma Assert
(Present (For_Typed_Variable)
and then
(In_Tree.Project_Nodes.Table (For_Typed_Variable).Kind =
N_Typed_Variable_Declaration));
declare
Current_String : Project_Node_Id :=
First_Literal_String
(String_Type_Of (For_Typed_Variable, In_Tree),
In_Tree);
begin
while Present (Current_String)
and then
String_Value_Of (Current_String, In_Tree) /= Value
loop
Current_String :=
Next_Literal_String (Current_String, In_Tree);
end loop;
return Present (Current_String);
end;
end Value_Is_Valid;
-------------------------------
-- There_Are_Unkept_Comments --
-------------------------------
function There_Are_Unkept_Comments return Boolean is
begin
return Unkept_Comments;
end There_Are_Unkept_Comments;
--------------------
-- Create_Project --
--------------------
function Create_Project
(In_Tree : Project_Node_Tree_Ref;
Name : Name_Id;
Full_Path : Path_Name_Type;
Is_Config_File : Boolean := False) return Project_Node_Id
is
Project : Project_Node_Id;
Qualifier : Project_Qualifier := Unspecified;
begin
Project := Default_Project_Node (In_Tree, N_Project);
Set_Name_Of (Project, In_Tree, Name);
Set_Display_Name_Of (Project, In_Tree, Name);
Set_Directory_Of
(Project, In_Tree,
Path_Name_Type (Get_Directory (File_Name_Type (Full_Path))));
Set_Path_Name_Of (Project, In_Tree, Full_Path);
Set_Project_Declaration_Of
(Project, In_Tree,
Default_Project_Node (In_Tree, N_Project_Declaration));
if Is_Config_File then
Qualifier := Configuration;
end if;
if not Is_Config_File then
Prj.Tree.Tree_Private_Part.Projects_Htable.Set
(In_Tree.Projects_HT,
Name,
Prj.Tree.Tree_Private_Part.Project_Name_And_Node'
(Name => Name,
Resolved_Path => No_Path,
Node => Project,
Extended => False,
From_Extended => False,
Proj_Qualifier => Qualifier));
end if;
return Project;
end Create_Project;
----------------
-- Add_At_End --
----------------
procedure Add_At_End
(Tree : Project_Node_Tree_Ref;
Parent : Project_Node_Id;
Expr : Project_Node_Id;
Add_Before_First_Pkg : Boolean := False;
Add_Before_First_Case : Boolean := False)
is
Real_Parent : Project_Node_Id;
New_Decl, Decl, Next : Project_Node_Id;
Last, L : Project_Node_Id;
begin
if Kind_Of (Expr, Tree) /= N_Declarative_Item then
New_Decl := Default_Project_Node (Tree, N_Declarative_Item);
Set_Current_Item_Node (New_Decl, Tree, Expr);
else
New_Decl := Expr;
end if;
if Kind_Of (Parent, Tree) = N_Project then
Real_Parent := Project_Declaration_Of (Parent, Tree);
else
Real_Parent := Parent;
end if;
Decl := First_Declarative_Item_Of (Real_Parent, Tree);
if Decl = Empty_Node then
Set_First_Declarative_Item_Of (Real_Parent, Tree, New_Decl);
else
loop
Next := Next_Declarative_Item (Decl, Tree);
exit when Next = Empty_Node
or else
(Add_Before_First_Pkg
and then Kind_Of (Current_Item_Node (Next, Tree), Tree) =
N_Package_Declaration)
or else
(Add_Before_First_Case
and then Kind_Of (Current_Item_Node (Next, Tree), Tree) =
N_Case_Construction);
Decl := Next;
end loop;
-- In case Expr is in fact a range of declarative items
Last := New_Decl;
loop
L := Next_Declarative_Item (Last, Tree);
exit when L = Empty_Node;
Last := L;
end loop;
-- In case Expr is in fact a range of declarative items
Last := New_Decl;
loop
L := Next_Declarative_Item (Last, Tree);
exit when L = Empty_Node;
Last := L;
end loop;
Set_Next_Declarative_Item (Last, Tree, Next);
Set_Next_Declarative_Item (Decl, Tree, New_Decl);
end if;
end Add_At_End;
---------------------------
-- Create_Literal_String --
---------------------------
function Create_Literal_String
(Str : Namet.Name_Id;
Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
Node : Project_Node_Id;
begin
Node := Default_Project_Node (Tree, N_Literal_String, Prj.Single);
Set_Next_Literal_String (Node, Tree, Empty_Node);
Set_String_Value_Of (Node, Tree, Str);
return Node;
end Create_Literal_String;
---------------------------
-- Enclose_In_Expression --
---------------------------
function Enclose_In_Expression
(Node : Project_Node_Id;
Tree : Project_Node_Tree_Ref) return Project_Node_Id
is
Expr : Project_Node_Id;
begin
if Kind_Of (Node, Tree) /= N_Expression then
Expr := Default_Project_Node (Tree, N_Expression, Single);
Set_First_Term
(Expr, Tree, Default_Project_Node (Tree, N_Term, Single));
Set_Current_Term (First_Term (Expr, Tree), Tree, Node);
return Expr;
else
return Node;
end if;
end Enclose_In_Expression;
--------------------
-- Create_Package --
--------------------
function Create_Package
(Tree : Project_Node_Tree_Ref;
Project : Project_Node_Id;
Pkg : String) return Project_Node_Id
is
Pack : Project_Node_Id;
N : Name_Id;
begin
Name_Len := Pkg'Length;
Name_Buffer (1 .. Name_Len) := Pkg;
N := Name_Find;
-- Check if the package already exists
Pack := First_Package_Of (Project, Tree);
while Pack /= Empty_Node loop
if Prj.Tree.Name_Of (Pack, Tree) = N then
return Pack;
end if;
Pack := Next_Package_In_Project (Pack, Tree);
end loop;
-- Create the package and add it to the declarative item
Pack := Default_Project_Node (Tree, N_Package_Declaration);
Set_Name_Of (Pack, Tree, N);
-- Find the correct package id to use
Set_Package_Id_Of (Pack, Tree, Package_Node_Id_Of (N));
-- Add it to the list of packages
Set_Next_Package_In_Project
(Pack, Tree, First_Package_Of (Project, Tree));
Set_First_Package_Of (Project, Tree, Pack);
Add_At_End (Tree, Project_Declaration_Of (Project, Tree), Pack);
return Pack;
end Create_Package;
----------------------
-- Create_Attribute --
----------------------
function Create_Attribute
(Tree : Project_Node_Tree_Ref;
Prj_Or_Pkg : Project_Node_Id;
Name : Name_Id;
Index_Name : Name_Id := No_Name;
Kind : Variable_Kind := List;
At_Index : Integer := 0;
Value : Project_Node_Id := Empty_Node) return Project_Node_Id
is
Node : constant Project_Node_Id :=
Default_Project_Node (Tree, N_Attribute_Declaration, Kind);
Case_Insensitive : Boolean;
Pkg : Package_Node_Id;
Start_At : Attribute_Node_Id;
Expr : Project_Node_Id;
begin
Set_Name_Of (Node, Tree, Name);
if Index_Name /= No_Name then
Set_Associative_Array_Index_Of (Node, Tree, Index_Name);
end if;
if Prj_Or_Pkg /= Empty_Node then
Add_At_End (Tree, Prj_Or_Pkg, Node);
end if;
-- Find out the case sensitivity of the attribute
if Prj_Or_Pkg /= Empty_Node
and then Kind_Of (Prj_Or_Pkg, Tree) = N_Package_Declaration
then
Pkg := Prj.Attr.Package_Node_Id_Of (Name_Of (Prj_Or_Pkg, Tree));
Start_At := First_Attribute_Of (Pkg);
else
Start_At := Attribute_First;
end if;
Start_At := Attribute_Node_Id_Of (Name, Start_At);
Case_Insensitive :=
Attribute_Kind_Of (Start_At) = Case_Insensitive_Associative_Array;
Tree.Project_Nodes.Table (Node).Flag1 := Case_Insensitive;
if At_Index /= 0 then
if Attribute_Kind_Of (Start_At) =
Optional_Index_Associative_Array
or else Attribute_Kind_Of (Start_At) =
Optional_Index_Case_Insensitive_Associative_Array
then
-- Results in: for Name ("index" at index) use "value";
-- This is currently only used for executables.
Set_Source_Index_Of (Node, Tree, To => Int (At_Index));
else
-- Results in: for Name ("index") use "value" at index;
-- ??? This limitation makes no sense, we should be able to
-- set the source index on an expression.
pragma Assert (Kind_Of (Value, Tree) = N_Literal_String);
Set_Source_Index_Of (Value, Tree, To => Int (At_Index));
end if;
end if;
if Value /= Empty_Node then
Expr := Enclose_In_Expression (Value, Tree);
Set_Expression_Of (Node, Tree, Expr);
end if;
return Node;
end Create_Attribute;
end Prj.Tree;
|
-- This spec has been automatically generated from STM32F429x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.LTDC is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype SSCR_VSH_Field is HAL.UInt11;
subtype SSCR_HSW_Field is HAL.UInt12;
-- Synchronization Size Configuration Register
type SSCR_Register is record
-- Vertical Synchronization Height (in units of horizontal scan line)
VSH : SSCR_VSH_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Horizontal Synchronization Width (in units of pixel clock period)
HSW : SSCR_HSW_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SSCR_Register use record
VSH at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
HSW at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype BPCR_AVBP_Field is HAL.UInt11;
subtype BPCR_AHBP_Field is HAL.UInt12;
-- Back Porch Configuration Register
type BPCR_Register is record
-- Accumulated Vertical back porch (in units of horizontal scan line)
AVBP : BPCR_AVBP_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Accumulated Horizontal back porch (in units of pixel clock period)
AHBP : BPCR_AHBP_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BPCR_Register use record
AVBP at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
AHBP at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype AWCR_AAH_Field is HAL.UInt11;
subtype AWCR_AAW_Field is HAL.UInt12;
-- Active Width Configuration Register
type AWCR_Register is record
-- Accumulated Active Height (in units of horizontal scan line)
AAH : AWCR_AAH_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Accumulated Active Width (in units of pixel clock period)
AAW : AWCR_AAW_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for AWCR_Register use record
AAH at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
AAW at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype TWCR_TOTALH_Field is HAL.UInt11;
subtype TWCR_TOTALW_Field is HAL.UInt12;
-- Total Width Configuration Register
type TWCR_Register is record
-- Total Height (in units of horizontal scan line)
TOTALH : TWCR_TOTALH_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Total Width (in units of pixel clock period)
TOTALW : TWCR_TOTALW_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TWCR_Register use record
TOTALH at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
TOTALW at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype GCR_DBW_Field is HAL.UInt3;
subtype GCR_DGW_Field is HAL.UInt3;
subtype GCR_DRW_Field is HAL.UInt3;
-- Global Control Register
type GCR_Register is record
-- LCD-TFT controller enable bit
LTDCEN : Boolean := False;
-- unspecified
Reserved_1_3 : HAL.UInt3 := 16#0#;
-- Read-only. Dither Blue Width
DBW : GCR_DBW_Field := 16#2#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Read-only. Dither Green Width
DGW : GCR_DGW_Field := 16#2#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- Read-only. Dither Red Width
DRW : GCR_DRW_Field := 16#2#;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- Dither Enable
DEN : Boolean := False;
-- unspecified
Reserved_17_27 : HAL.UInt11 := 16#0#;
-- Pixel Clock Polarity
PCPOL : Boolean := False;
-- Data Enable Polarity
DEPOL : Boolean := False;
-- Vertical Synchronization Polarity
VSPOL : Boolean := False;
-- Horizontal Synchronization Polarity
HSPOL : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for GCR_Register use record
LTDCEN at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
DBW at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
DGW at 0 range 8 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
DRW at 0 range 12 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
DEN at 0 range 16 .. 16;
Reserved_17_27 at 0 range 17 .. 27;
PCPOL at 0 range 28 .. 28;
DEPOL at 0 range 29 .. 29;
VSPOL at 0 range 30 .. 30;
HSPOL at 0 range 31 .. 31;
end record;
-- Shadow Reload Configuration Register
type SRCR_Register is record
-- Immediate Reload
IMR : Boolean := False;
-- Vertical Blanking Reload
VBR : Boolean := False;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SRCR_Register use record
IMR at 0 range 0 .. 0;
VBR at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
subtype BCCR_BC_Field is HAL.UInt24;
-- Background Color Configuration Register
type BCCR_Register is record
-- Background Color Red value
BC : BCCR_BC_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BCCR_Register use record
BC at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- Interrupt Enable Register
type IER_Register is record
-- Line Interrupt Enable
LIE : Boolean := False;
-- FIFO Underrun Interrupt Enable
FUIE : Boolean := False;
-- Transfer Error Interrupt Enable
TERRIE : Boolean := False;
-- Register Reload interrupt enable
RRIE : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IER_Register use record
LIE at 0 range 0 .. 0;
FUIE at 0 range 1 .. 1;
TERRIE at 0 range 2 .. 2;
RRIE at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- Interrupt Status Register
type ISR_Register is record
-- Read-only. Line Interrupt flag
LIF : Boolean;
-- Read-only. FIFO Underrun Interrupt flag
FUIF : Boolean;
-- Read-only. Transfer Error interrupt flag
TERRIF : Boolean;
-- Read-only. Register Reload Interrupt Flag
RRIF : Boolean;
-- unspecified
Reserved_4_31 : HAL.UInt28;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ISR_Register use record
LIF at 0 range 0 .. 0;
FUIF at 0 range 1 .. 1;
TERRIF at 0 range 2 .. 2;
RRIF at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- Interrupt Clear Register
type ICR_Register is record
-- Write-only. Clears the Line Interrupt Flag
CLIF : Boolean := False;
-- Write-only. Clears the FIFO Underrun Interrupt flag
CFUIF : Boolean := False;
-- Write-only. Clears the Transfer Error Interrupt Flag
CTERRIF : Boolean := False;
-- Write-only. Clears Register Reload Interrupt Flag
CRRIF : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ICR_Register use record
CLIF at 0 range 0 .. 0;
CFUIF at 0 range 1 .. 1;
CTERRIF at 0 range 2 .. 2;
CRRIF at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype LIPCR_LIPOS_Field is HAL.UInt11;
-- Line Interrupt Position Configuration Register
type LIPCR_Register is record
-- Line Interrupt Position
LIPOS : LIPCR_LIPOS_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for LIPCR_Register use record
LIPOS at 0 range 0 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
subtype CPSR_CYPOS_Field is HAL.UInt16;
subtype CPSR_CXPOS_Field is HAL.UInt16;
-- Current Position Status Register
type CPSR_Register is record
-- Read-only. Current Y Position
CYPOS : CPSR_CYPOS_Field;
-- Read-only. Current X Position
CXPOS : CPSR_CXPOS_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CPSR_Register use record
CYPOS at 0 range 0 .. 15;
CXPOS at 0 range 16 .. 31;
end record;
-- Current Display Status Register
type CDSR_Register is record
-- Read-only. Vertical Data Enable display Status
VDES : Boolean;
-- Read-only. Horizontal Data Enable display Status
HDES : Boolean;
-- Read-only. Vertical Synchronization display Status
VSYNCS : Boolean;
-- Read-only. Horizontal Synchronization display Status
HSYNCS : Boolean;
-- unspecified
Reserved_4_31 : HAL.UInt28;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CDSR_Register use record
VDES at 0 range 0 .. 0;
HDES at 0 range 1 .. 1;
VSYNCS at 0 range 2 .. 2;
HSYNCS at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- Layerx Control Register
type L1CR_Register is record
-- Layer Enable
LEN : Boolean := False;
-- Color Keying Enable
COLKEN : Boolean := False;
-- unspecified
Reserved_2_3 : HAL.UInt2 := 16#0#;
-- Color Look-Up Table Enable
CLUTEN : Boolean := False;
-- unspecified
Reserved_5_31 : HAL.UInt27 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CR_Register use record
LEN at 0 range 0 .. 0;
COLKEN at 0 range 1 .. 1;
Reserved_2_3 at 0 range 2 .. 3;
CLUTEN at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
subtype L1WHPCR_WHSTPOS_Field is HAL.UInt12;
subtype L1WHPCR_WHSPPOS_Field is HAL.UInt12;
-- Layerx Window Horizontal Position Configuration Register
type L1WHPCR_Register is record
-- Window Horizontal Start Position
WHSTPOS : L1WHPCR_WHSTPOS_Field := 16#0#;
-- unspecified
Reserved_12_15 : HAL.UInt4 := 16#0#;
-- Window Horizontal Stop Position
WHSPPOS : L1WHPCR_WHSPPOS_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1WHPCR_Register use record
WHSTPOS at 0 range 0 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
WHSPPOS at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype L1WVPCR_WVSTPOS_Field is HAL.UInt11;
subtype L1WVPCR_WVSPPOS_Field is HAL.UInt11;
-- Layerx Window Vertical Position Configuration Register
type L1WVPCR_Register is record
-- Window Vertical Start Position
WVSTPOS : L1WVPCR_WVSTPOS_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Window Vertical Stop Position
WVSPPOS : L1WVPCR_WVSPPOS_Field := 16#0#;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1WVPCR_Register use record
WVSTPOS at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
WVSPPOS at 0 range 16 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
subtype L1CKCR_CKBLUE_Field is HAL.UInt8;
subtype L1CKCR_CKGREEN_Field is HAL.UInt8;
subtype L1CKCR_CKRED_Field is HAL.UInt8;
-- Layerx Color Keying Configuration Register
type L1CKCR_Register is record
-- Color Key Blue value
CKBLUE : L1CKCR_CKBLUE_Field := 16#0#;
-- Color Key Green value
CKGREEN : L1CKCR_CKGREEN_Field := 16#0#;
-- Color Key Red value
CKRED : L1CKCR_CKRED_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CKCR_Register use record
CKBLUE at 0 range 0 .. 7;
CKGREEN at 0 range 8 .. 15;
CKRED at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype L1PFCR_PF_Field is HAL.UInt3;
-- Layerx Pixel Format Configuration Register
type L1PFCR_Register is record
-- Pixel Format
PF : L1PFCR_PF_Field := 16#0#;
-- unspecified
Reserved_3_31 : HAL.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1PFCR_Register use record
PF at 0 range 0 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype L1CACR_CONSTA_Field is HAL.UInt8;
-- Layerx Constant Alpha Configuration Register
type L1CACR_Register is record
-- Constant Alpha
CONSTA : L1CACR_CONSTA_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CACR_Register use record
CONSTA at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype L1DCCR_DCBLUE_Field is HAL.UInt8;
subtype L1DCCR_DCGREEN_Field is HAL.UInt8;
subtype L1DCCR_DCRED_Field is HAL.UInt8;
subtype L1DCCR_DCALPHA_Field is HAL.UInt8;
-- Layerx Default Color Configuration Register
type L1DCCR_Register is record
-- Default Color Blue
DCBLUE : L1DCCR_DCBLUE_Field := 16#0#;
-- Default Color Green
DCGREEN : L1DCCR_DCGREEN_Field := 16#0#;
-- Default Color Red
DCRED : L1DCCR_DCRED_Field := 16#0#;
-- Default Color Alpha
DCALPHA : L1DCCR_DCALPHA_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1DCCR_Register use record
DCBLUE at 0 range 0 .. 7;
DCGREEN at 0 range 8 .. 15;
DCRED at 0 range 16 .. 23;
DCALPHA at 0 range 24 .. 31;
end record;
subtype L1BFCR_BF2_Field is HAL.UInt3;
subtype L1BFCR_BF1_Field is HAL.UInt3;
-- Layerx Blending Factors Configuration Register
type L1BFCR_Register is record
-- Blending Factor 2
BF2 : L1BFCR_BF2_Field := 16#7#;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- Blending Factor 1
BF1 : L1BFCR_BF1_Field := 16#6#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1BFCR_Register use record
BF2 at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
BF1 at 0 range 8 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
subtype L1CFBLR_CFBLL_Field is HAL.UInt13;
subtype L1CFBLR_CFBP_Field is HAL.UInt13;
-- Layerx Color Frame Buffer Length Register
type L1CFBLR_Register is record
-- Color Frame Buffer Line Length
CFBLL : L1CFBLR_CFBLL_Field := 16#0#;
-- unspecified
Reserved_13_15 : HAL.UInt3 := 16#0#;
-- Color Frame Buffer Pitch in bytes
CFBP : L1CFBLR_CFBP_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CFBLR_Register use record
CFBLL at 0 range 0 .. 12;
Reserved_13_15 at 0 range 13 .. 15;
CFBP at 0 range 16 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype L1CFBLNR_CFBLNBR_Field is HAL.UInt11;
-- Layerx ColorFrame Buffer Line Number Register
type L1CFBLNR_Register is record
-- Frame Buffer Line Number
CFBLNBR : L1CFBLNR_CFBLNBR_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CFBLNR_Register use record
CFBLNBR at 0 range 0 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
subtype L1CLUTWR_BLUE_Field is HAL.UInt8;
subtype L1CLUTWR_GREEN_Field is HAL.UInt8;
subtype L1CLUTWR_RED_Field is HAL.UInt8;
subtype L1CLUTWR_CLUTADD_Field is HAL.UInt8;
-- Layerx CLUT Write Register
type L1CLUTWR_Register is record
-- Write-only. Blue value
BLUE : L1CLUTWR_BLUE_Field := 16#0#;
-- Write-only. Green value
GREEN : L1CLUTWR_GREEN_Field := 16#0#;
-- Write-only. Red value
RED : L1CLUTWR_RED_Field := 16#0#;
-- Write-only. CLUT Address
CLUTADD : L1CLUTWR_CLUTADD_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CLUTWR_Register use record
BLUE at 0 range 0 .. 7;
GREEN at 0 range 8 .. 15;
RED at 0 range 16 .. 23;
CLUTADD at 0 range 24 .. 31;
end record;
-- Layerx Control Register
type L2CR_Register is record
-- Layer Enable
LEN : Boolean := False;
-- Color Keying Enable
COLKEN : Boolean := False;
-- unspecified
Reserved_2_3 : HAL.UInt2 := 16#0#;
-- Color Look-Up Table Enable
CLUTEN : Boolean := False;
-- unspecified
Reserved_5_31 : HAL.UInt27 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CR_Register use record
LEN at 0 range 0 .. 0;
COLKEN at 0 range 1 .. 1;
Reserved_2_3 at 0 range 2 .. 3;
CLUTEN at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
subtype L2WHPCR_WHSTPOS_Field is HAL.UInt12;
subtype L2WHPCR_WHSPPOS_Field is HAL.UInt12;
-- Layerx Window Horizontal Position Configuration Register
type L2WHPCR_Register is record
-- Window Horizontal Start Position
WHSTPOS : L2WHPCR_WHSTPOS_Field := 16#0#;
-- unspecified
Reserved_12_15 : HAL.UInt4 := 16#0#;
-- Window Horizontal Stop Position
WHSPPOS : L2WHPCR_WHSPPOS_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2WHPCR_Register use record
WHSTPOS at 0 range 0 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
WHSPPOS at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype L2WVPCR_WVSTPOS_Field is HAL.UInt11;
subtype L2WVPCR_WVSPPOS_Field is HAL.UInt11;
-- Layerx Window Vertical Position Configuration Register
type L2WVPCR_Register is record
-- Window Vertical Start Position
WVSTPOS : L2WVPCR_WVSTPOS_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Window Vertical Stop Position
WVSPPOS : L2WVPCR_WVSPPOS_Field := 16#0#;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2WVPCR_Register use record
WVSTPOS at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
WVSPPOS at 0 range 16 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
subtype L2CKCR_CKBLUE_Field is HAL.UInt8;
subtype L2CKCR_CKGREEN_Field is HAL.UInt7;
subtype L2CKCR_CKRED_Field is HAL.UInt9;
-- Layerx Color Keying Configuration Register
type L2CKCR_Register is record
-- Color Key Blue value
CKBLUE : L2CKCR_CKBLUE_Field := 16#0#;
-- Color Key Green value
CKGREEN : L2CKCR_CKGREEN_Field := 16#0#;
-- Color Key Red value
CKRED : L2CKCR_CKRED_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CKCR_Register use record
CKBLUE at 0 range 0 .. 7;
CKGREEN at 0 range 8 .. 14;
CKRED at 0 range 15 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype L2PFCR_PF_Field is HAL.UInt3;
-- Layerx Pixel Format Configuration Register
type L2PFCR_Register is record
-- Pixel Format
PF : L2PFCR_PF_Field := 16#0#;
-- unspecified
Reserved_3_31 : HAL.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2PFCR_Register use record
PF at 0 range 0 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype L2CACR_CONSTA_Field is HAL.UInt8;
-- Layerx Constant Alpha Configuration Register
type L2CACR_Register is record
-- Constant Alpha
CONSTA : L2CACR_CONSTA_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CACR_Register use record
CONSTA at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype L2DCCR_DCBLUE_Field is HAL.UInt8;
subtype L2DCCR_DCGREEN_Field is HAL.UInt8;
subtype L2DCCR_DCRED_Field is HAL.UInt8;
subtype L2DCCR_DCALPHA_Field is HAL.UInt8;
-- Layerx Default Color Configuration Register
type L2DCCR_Register is record
-- Default Color Blue
DCBLUE : L2DCCR_DCBLUE_Field := 16#0#;
-- Default Color Green
DCGREEN : L2DCCR_DCGREEN_Field := 16#0#;
-- Default Color Red
DCRED : L2DCCR_DCRED_Field := 16#0#;
-- Default Color Alpha
DCALPHA : L2DCCR_DCALPHA_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2DCCR_Register use record
DCBLUE at 0 range 0 .. 7;
DCGREEN at 0 range 8 .. 15;
DCRED at 0 range 16 .. 23;
DCALPHA at 0 range 24 .. 31;
end record;
subtype L2BFCR_BF2_Field is HAL.UInt3;
subtype L2BFCR_BF1_Field is HAL.UInt3;
-- Layerx Blending Factors Configuration Register
type L2BFCR_Register is record
-- Blending Factor 2
BF2 : L2BFCR_BF2_Field := 16#7#;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- Blending Factor 1
BF1 : L2BFCR_BF1_Field := 16#6#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2BFCR_Register use record
BF2 at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
BF1 at 0 range 8 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
subtype L2CFBLR_CFBLL_Field is HAL.UInt13;
subtype L2CFBLR_CFBP_Field is HAL.UInt13;
-- Layerx Color Frame Buffer Length Register
type L2CFBLR_Register is record
-- Color Frame Buffer Line Length
CFBLL : L2CFBLR_CFBLL_Field := 16#0#;
-- unspecified
Reserved_13_15 : HAL.UInt3 := 16#0#;
-- Color Frame Buffer Pitch in bytes
CFBP : L2CFBLR_CFBP_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CFBLR_Register use record
CFBLL at 0 range 0 .. 12;
Reserved_13_15 at 0 range 13 .. 15;
CFBP at 0 range 16 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype L2CFBLNR_CFBLNBR_Field is HAL.UInt11;
-- Layerx ColorFrame Buffer Line Number Register
type L2CFBLNR_Register is record
-- Frame Buffer Line Number
CFBLNBR : L2CFBLNR_CFBLNBR_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CFBLNR_Register use record
CFBLNBR at 0 range 0 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
subtype L2CLUTWR_BLUE_Field is HAL.UInt8;
subtype L2CLUTWR_GREEN_Field is HAL.UInt8;
subtype L2CLUTWR_RED_Field is HAL.UInt8;
subtype L2CLUTWR_CLUTADD_Field is HAL.UInt8;
-- Layerx CLUT Write Register
type L2CLUTWR_Register is record
-- Write-only. Blue value
BLUE : L2CLUTWR_BLUE_Field := 16#0#;
-- Write-only. Green value
GREEN : L2CLUTWR_GREEN_Field := 16#0#;
-- Write-only. Red value
RED : L2CLUTWR_RED_Field := 16#0#;
-- Write-only. CLUT Address
CLUTADD : L2CLUTWR_CLUTADD_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CLUTWR_Register use record
BLUE at 0 range 0 .. 7;
GREEN at 0 range 8 .. 15;
RED at 0 range 16 .. 23;
CLUTADD at 0 range 24 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- LCD-TFT Controller
type LTDC_Peripheral is record
-- Synchronization Size Configuration Register
SSCR : aliased SSCR_Register;
-- Back Porch Configuration Register
BPCR : aliased BPCR_Register;
-- Active Width Configuration Register
AWCR : aliased AWCR_Register;
-- Total Width Configuration Register
TWCR : aliased TWCR_Register;
-- Global Control Register
GCR : aliased GCR_Register;
-- Shadow Reload Configuration Register
SRCR : aliased SRCR_Register;
-- Background Color Configuration Register
BCCR : aliased BCCR_Register;
-- Interrupt Enable Register
IER : aliased IER_Register;
-- Interrupt Status Register
ISR : aliased ISR_Register;
-- Interrupt Clear Register
ICR : aliased ICR_Register;
-- Line Interrupt Position Configuration Register
LIPCR : aliased LIPCR_Register;
-- Current Position Status Register
CPSR : aliased CPSR_Register;
-- Current Display Status Register
CDSR : aliased CDSR_Register;
-- Layerx Control Register
L1CR : aliased L1CR_Register;
-- Layerx Window Horizontal Position Configuration Register
L1WHPCR : aliased L1WHPCR_Register;
-- Layerx Window Vertical Position Configuration Register
L1WVPCR : aliased L1WVPCR_Register;
-- Layerx Color Keying Configuration Register
L1CKCR : aliased L1CKCR_Register;
-- Layerx Pixel Format Configuration Register
L1PFCR : aliased L1PFCR_Register;
-- Layerx Constant Alpha Configuration Register
L1CACR : aliased L1CACR_Register;
-- Layerx Default Color Configuration Register
L1DCCR : aliased L1DCCR_Register;
-- Layerx Blending Factors Configuration Register
L1BFCR : aliased L1BFCR_Register;
-- Layerx Color Frame Buffer Address Register
L1CFBAR : aliased HAL.UInt32;
-- Layerx Color Frame Buffer Length Register
L1CFBLR : aliased L1CFBLR_Register;
-- Layerx ColorFrame Buffer Line Number Register
L1CFBLNR : aliased L1CFBLNR_Register;
-- Layerx CLUT Write Register
L1CLUTWR : aliased L1CLUTWR_Register;
-- Layerx Control Register
L2CR : aliased L2CR_Register;
-- Layerx Window Horizontal Position Configuration Register
L2WHPCR : aliased L2WHPCR_Register;
-- Layerx Window Vertical Position Configuration Register
L2WVPCR : aliased L2WVPCR_Register;
-- Layerx Color Keying Configuration Register
L2CKCR : aliased L2CKCR_Register;
-- Layerx Pixel Format Configuration Register
L2PFCR : aliased L2PFCR_Register;
-- Layerx Constant Alpha Configuration Register
L2CACR : aliased L2CACR_Register;
-- Layerx Default Color Configuration Register
L2DCCR : aliased L2DCCR_Register;
-- Layerx Blending Factors Configuration Register
L2BFCR : aliased L2BFCR_Register;
-- Layerx Color Frame Buffer Address Register
L2CFBAR : aliased HAL.UInt32;
-- Layerx Color Frame Buffer Length Register
L2CFBLR : aliased L2CFBLR_Register;
-- Layerx ColorFrame Buffer Line Number Register
L2CFBLNR : aliased L2CFBLNR_Register;
-- Layerx CLUT Write Register
L2CLUTWR : aliased L2CLUTWR_Register;
end record
with Volatile;
for LTDC_Peripheral use record
SSCR at 16#8# range 0 .. 31;
BPCR at 16#C# range 0 .. 31;
AWCR at 16#10# range 0 .. 31;
TWCR at 16#14# range 0 .. 31;
GCR at 16#18# range 0 .. 31;
SRCR at 16#24# range 0 .. 31;
BCCR at 16#2C# range 0 .. 31;
IER at 16#34# range 0 .. 31;
ISR at 16#38# range 0 .. 31;
ICR at 16#3C# range 0 .. 31;
LIPCR at 16#40# range 0 .. 31;
CPSR at 16#44# range 0 .. 31;
CDSR at 16#48# range 0 .. 31;
L1CR at 16#84# range 0 .. 31;
L1WHPCR at 16#88# range 0 .. 31;
L1WVPCR at 16#8C# range 0 .. 31;
L1CKCR at 16#90# range 0 .. 31;
L1PFCR at 16#94# range 0 .. 31;
L1CACR at 16#98# range 0 .. 31;
L1DCCR at 16#9C# range 0 .. 31;
L1BFCR at 16#A0# range 0 .. 31;
L1CFBAR at 16#AC# range 0 .. 31;
L1CFBLR at 16#B0# range 0 .. 31;
L1CFBLNR at 16#B4# range 0 .. 31;
L1CLUTWR at 16#C4# range 0 .. 31;
L2CR at 16#104# range 0 .. 31;
L2WHPCR at 16#108# range 0 .. 31;
L2WVPCR at 16#10C# range 0 .. 31;
L2CKCR at 16#110# range 0 .. 31;
L2PFCR at 16#114# range 0 .. 31;
L2CACR at 16#118# range 0 .. 31;
L2DCCR at 16#11C# range 0 .. 31;
L2BFCR at 16#120# range 0 .. 31;
L2CFBAR at 16#12C# range 0 .. 31;
L2CFBLR at 16#130# range 0 .. 31;
L2CFBLNR at 16#134# range 0 .. 31;
L2CLUTWR at 16#144# range 0 .. 31;
end record;
-- LCD-TFT Controller
LTDC_Periph : aliased LTDC_Peripheral
with Import, Address => System'To_Address (16#40016800#);
end STM32_SVD.LTDC;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . L I S T S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2018-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
pragma Compiler_Unit_Warning;
package GNAT.Lists is
------------------------
-- Doubly_Linked_List --
------------------------
-- The following package offers a doubly linked list abstraction with the
-- following characteristics:
--
-- * Creation of multiple instances, of different sizes.
-- * Iterable elements.
--
-- The following use pattern must be employed with this list:
--
-- List : Instance := Create;
--
-- <various operations>
--
-- Destroy (List);
--
-- The destruction of the list reclaims all storage occupied by it.
generic
type Element_Type is private;
with function "="
(Left : Element_Type;
Right : Element_Type) return Boolean;
package Doubly_Linked_List is
---------------------
-- List operations --
---------------------
type Instance is private;
Nil : constant Instance;
-- The following exception is raised when the list is empty, and an
-- attempt is made to delete an element from it.
List_Empty : exception;
procedure Append (L : Instance; Elem : Element_Type);
-- Insert element Elem at the end of list L. This action will raise
-- Iterated if the list has outstanding iterators.
function Contains (L : Instance; Elem : Element_Type) return Boolean;
-- Determine whether list L contains element Elem
function Create return Instance;
-- Create a new list
procedure Delete (L : Instance; Elem : Element_Type);
-- Delete element Elem from list L. The routine has no effect if Elem is
-- not present. This action will raise
--
-- * List_Empty if the list is empty.
-- * Iterated if the list has outstanding iterators.
procedure Delete_First (L : Instance);
-- Delete an element from the start of list L. This action will raise
--
-- * List_Empty if the list is empty.
-- * Iterated if the list has outstanding iterators.
procedure Delete_Last (L : Instance);
-- Delete an element from the end of list L. This action will raise
--
-- * List_Empty if the list is empty.
-- * Iterated if the list has outstanding iterators.
procedure Destroy (L : in out Instance);
-- Destroy the contents of list L. This routine must be called at the
-- end of a list's lifetime. This action will raise Iterated if the
-- list has outstanding iterators.
function First (L : Instance) return Element_Type;
-- Obtain an element from the start of list L. This action will raise
-- List_Empty if the list is empty.
procedure Insert_After
(L : Instance;
After : Element_Type;
Elem : Element_Type);
-- Insert new element Elem after element After in list L. The routine
-- has no effect if After is not present. This action will raise
-- Iterated if the list has outstanding iterators.
procedure Insert_Before
(L : Instance;
Before : Element_Type;
Elem : Element_Type);
-- Insert new element Elem before element Before in list L. The routine
-- has no effect if After is not present. This action will raise
-- Iterated if the list has outstanding iterators.
function Is_Empty (L : Instance) return Boolean;
-- Determine whether list L is empty
function Last (L : Instance) return Element_Type;
-- Obtain an element from the end of list L. This action will raise
-- List_Empty if the list is empty.
procedure Prepend (L : Instance; Elem : Element_Type);
-- Insert element Elem at the start of list L. This action will raise
-- Iterated if the list has outstanding iterators.
procedure Replace
(L : Instance;
Old_Elem : Element_Type;
New_Elem : Element_Type);
-- Replace old element Old_Elem with new element New_Elem in list L. The
-- routine has no effect if Old_Elem is not present. This action will
-- raise Iterated if the list has outstanding iterators.
function Size (L : Instance) return Natural;
-- Obtain the number of elements in list L
-------------------------
-- Iterator operations --
-------------------------
-- The following type represents an element iterator. An iterator locks
-- all mutation operations, and ulocks them once it is exhausted. The
-- iterator must be used with the following pattern:
--
-- Iter := Iterate (My_List);
-- while Has_Next (Iter) loop
-- Next (Iter, Element);
-- end loop;
--
-- It is possible to advance the iterator by using Next only, however
-- this risks raising Iterator_Exhausted.
type Iterator is private;
function Iterate (L : Instance) return Iterator;
-- Obtain an iterator over the elements of list L. This action locks all
-- mutation functionality of the associated list.
function Has_Next (Iter : Iterator) return Boolean;
-- Determine whether iterator Iter has more elements to examine. If the
-- iterator has been exhausted, restore all mutation functionality of
-- the associated list.
procedure Next (Iter : in out Iterator; Elem : out Element_Type);
-- Return the current element referenced by iterator Iter and advance
-- to the next available element. If the iterator has been exhausted
-- and further attempts are made to advance it, this routine restores
-- mutation functionality of the associated list, and then raises
-- Iterator_Exhausted.
private
-- The following type represents a list node
type Node;
type Node_Ptr is access all Node;
type Node is record
Elem : Element_Type;
Next : Node_Ptr := null;
Prev : Node_Ptr := null;
end record;
-- The following type represents a list
type Linked_List is record
Elements : Natural := 0;
-- The number of elements in the list
Iterators : Natural := 0;
-- Number of outstanding iterators
Nodes : aliased Node;
-- The dummy head of the list
end record;
type Instance is access all Linked_List;
Nil : constant Instance := null;
-- The following type represents an element iterator
type Iterator is record
List : Instance := null;
-- Reference to the associated list
Nod : Node_Ptr := null;
-- Reference to the current node being examined. The invariant of the
-- iterator requires that this field always points to a valid node. A
-- value of null indicates that the iterator is exhausted.
end record;
end Doubly_Linked_List;
end GNAT.Lists;
|
with Ada.Containers.Synchronized_Queue_Interfaces,
Ada.Containers.Unbounded_Synchronized_Queues,
Ada.Containers.Vectors,
Ada.Execution_Time,
Ada.Integer_Text_IO,
Ada.Long_Long_Integer_Text_IO,
Ada.Real_Time,
Ada.Strings.Fixed,
Ada.Strings.Unbounded,
Ada.Text_IO;
with Utils;
procedure Main is
use Ada.Execution_Time,
Ada.Real_Time,
Ada.Strings.Fixed,
Ada.Strings.Unbounded,
Ada.Text_IO;
use Utils;
package Character_Queue_Interfaces is
new Ada.Containers.Synchronized_Queue_Interfaces (Element_Type => Character);
package Character_Queues is new Ada.Containers.Unbounded_Synchronized_Queues
(Queue_Interfaces => Character_Queue_Interfaces);
use Character_Queues;
function Pop (Q : in out Queue; N : Positive; Nb_Delete : in out Long_Long_Natural) return String;
function Pop (Q : in out Queue; N : Positive; Nb_Delete : in out Long_Long_Natural) return String is
Result : String (1 .. N);
begin
for Index in 1 .. N loop
Q.Dequeue (Result (Index));
end loop;
Nb_Delete := Nb_Delete + Long_Long_Natural (N);
return Result;
end Pop;
File : File_Type;
Start_Time, End_Time : CPU_Time;
Execution_Duration : Time_Span;
File_Is_Empty : Boolean := True;
Result : Long_Long_Natural := Long_Long_Natural'First;
Packet : Queue;
begin
Get_File (File);
-- Get all values
declare
begin
while not End_Of_File (File) loop
declare
Str : constant String := Get_Line (File);
Value : Natural;
Temp : String (1 .. 8);
begin
for Char of Str loop
Value := Natural'Value ("16#" & Char & "#");
Ada.Integer_Text_IO.Put (Temp,
Value,
Base => 2);
File_Is_Empty := False;
declare
Trimmed : constant String := Trim (Temp, Ada.Strings.Both);
Formatted_Bin_Str : constant String :=
Tail (Trimmed (Trimmed'First + 2 .. Trimmed'Last - 1), 4, '0');
begin
for Elt of Formatted_Bin_Str loop
Packet.Enqueue (Elt);
end loop;
end;
end loop;
end;
end loop;
end;
-- Exit the program if there is no values
if File_Is_Empty then
Close_If_Open (File);
Put_Line ("The input file is empty.");
return;
end if;
-- Do the puzzle
Start_Time := Ada.Execution_Time.Clock;
Solve_Puzzle : declare
function Parse_Packet (Packet : in out Queue) return Long_Long_Natural;
function Parse_Packet (Packet : in out Queue) return Long_Long_Natural is
package Long_Long_Natural_Vectrors is new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => Long_Long_Natural,
"=" => "=");
function Inner_Parse (Packet : in out Queue; Last_Index : in out Long_Long_Natural) return Long_Long_Natural;
function Inner_Parse (Packet : in out Queue; Last_Index : in out Long_Long_Natural) return Long_Long_Natural
is
use Ada.Long_Long_Integer_Text_IO;
use Long_Long_Natural_Vectrors;
procedure Get (Source : String; Result : out Long_Long_Natural);
procedure Get (Source : String; Result : out Long_Long_Natural) is
Last : Positive;
begin
Get ("2#" & Source & "#", Result, Last);
end Get;
subtype Type_Id_Value is Long_Long_Natural range 0 .. 7;
Version : Long_Long_Natural;
Type_Id : Type_Id_Value;
begin
Get (Pop (Packet, 3, Last_Index), Version);
Get (Pop (Packet, 3, Last_Index), Type_Id);
if Type_Id = 4 then
declare
Accumulator : Unbounded_String := Null_Unbounded_String;
Current : String (1 .. 1);
Value : Long_Long_Natural;
begin
loop
Current := Pop (Packet, 1, Last_Index);
Accumulator := Accumulator & Pop (Packet, 4, Last_Index);
exit when Current = "0";
end loop;
Get (To_String (Accumulator), Value);
return Value;
end;
else
declare
Values : Vector;
Length_Id : Long_Long_Natural;
Sub_Packet_Length : Long_Long_Natural;
Number_Of_Sub_Packet : Long_Long_Natural;
begin
Get (Pop (Packet, 1, Last_Index), Length_Id);
if Length_Id = 0 then
Get (Pop (Packet, 15, Last_Index), Sub_Packet_Length);
declare
End_Pop : constant Long_Long_Natural := Last_Index + Sub_Packet_Length;
begin
while Last_Index < End_Pop loop
Values.Append (Inner_Parse (Packet, Last_Index));
end loop;
end;
else
Get (Pop (Packet, 11, Last_Index), Number_Of_Sub_Packet);
for Sub_Packet_Index in 1 .. Number_Of_Sub_Packet loop
Values.Append (Inner_Parse (Packet, Last_Index));
end loop;
end if;
return Value : Long_Long_Natural do
case Type_Id is
when 0 =>
-- Sum
for Elt of Values loop
Value := Value + Elt;
end loop;
when 1 =>
-- Product
Value := 1;
for Elt of Values loop
Value := Value * Elt;
end loop;
when 2 =>
-- Minimum
Value := Long_Long_Natural'Last;
for Elt of Values loop
if Elt < Value then
Value := Elt;
end if;
end loop;
when 3 =>
-- Maximum
Value := Long_Long_Natural'First;
for Elt of Values loop
if Elt > Value then
Value := Elt;
end if;
end loop;
when 4 =>
raise Constraint_Error with "Unexpected Type ID 4";
when 5 =>
-- Greater than
if Values.Element (1) > Values.Element (2) then
Value := 1;
else
Value := 0;
end if;
when 6 =>
-- Less than
if Values.Element (1) < Values.Element (2) then
Value := 1;
else
Value := 0;
end if;
when 7 =>
-- Equal to
if Values.Element (1) = Values.Element (2) then
Value := 1;
else
Value := 0;
end if;
end case;
end return;
end;
end if;
end Inner_Parse;
Last_Index : Long_Long_Natural := Long_Long_Natural'First;
begin
return Inner_Parse (Packet, Last_Index);
end Parse_Packet;
begin
Result := Parse_Packet (Packet);
end Solve_Puzzle;
End_Time := Ada.Execution_Time.Clock;
Execution_Duration := End_Time - Start_Time;
Put ("Result: ");
Ada.Long_Long_Integer_Text_IO.Put (Item => Result,
Width => 0);
New_Line;
Put_Line ("(Took " & Duration'Image (To_Duration (Execution_Duration) * 1_000_000) & "µs)");
exception
when others =>
Close_If_Open (File);
raise;
end Main;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME EXTENSIONS --
-- --
-- X A D A . D I S P A T C H I N G --
-- --
-- S p e c --
-- --
------------------------------------------------------------------------------
package XAda.Dispatching is
pragma Pure (Dispatching);
Dispatching_Policy_Error : exception;
end XAda.Dispatching;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Elements.Statements;
with Program.Elements.Defining_Identifiers;
with Program.Lexical_Elements;
with Program.Elements.Loop_Parameter_Specifications;
with Program.Elements.Generalized_Iterator_Specifications;
with Program.Elements.Element_Iterator_Specifications;
with Program.Element_Vectors;
with Program.Elements.Identifiers;
package Program.Elements.For_Loop_Statements is
pragma Pure (Program.Elements.For_Loop_Statements);
type For_Loop_Statement is
limited interface and Program.Elements.Statements.Statement;
type For_Loop_Statement_Access is access all For_Loop_Statement'Class
with Storage_Size => 0;
not overriding function Statement_Identifier
(Self : For_Loop_Statement)
return Program.Elements.Defining_Identifiers.Defining_Identifier_Access
is abstract;
not overriding function Loop_Parameter
(Self : For_Loop_Statement)
return Program.Elements.Loop_Parameter_Specifications
.Loop_Parameter_Specification_Access is abstract;
not overriding function Generalized_Iterator
(Self : For_Loop_Statement)
return Program.Elements.Generalized_Iterator_Specifications
.Generalized_Iterator_Specification_Access is abstract;
not overriding function Element_Iterator
(Self : For_Loop_Statement)
return Program.Elements.Element_Iterator_Specifications
.Element_Iterator_Specification_Access is abstract;
not overriding function Statements
(Self : For_Loop_Statement)
return not null Program.Element_Vectors.Element_Vector_Access
is abstract;
not overriding function End_Statement_Identifier
(Self : For_Loop_Statement)
return Program.Elements.Identifiers.Identifier_Access is abstract;
type For_Loop_Statement_Text is limited interface;
type For_Loop_Statement_Text_Access is
access all For_Loop_Statement_Text'Class with Storage_Size => 0;
not overriding function To_For_Loop_Statement_Text
(Self : aliased in out For_Loop_Statement)
return For_Loop_Statement_Text_Access is abstract;
not overriding function Colon_Token
(Self : For_Loop_Statement_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function For_Token
(Self : For_Loop_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Loop_Token
(Self : For_Loop_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function End_Token
(Self : For_Loop_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Loop_Token_2
(Self : For_Loop_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Semicolon_Token
(Self : For_Loop_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
end Program.Elements.For_Loop_Statements;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Testsuite Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with League.Strings;
private with XML.SAX.Attributes;
with XML.SAX.Content_Handlers;
with DOMConf.Scripts;
package DOMConf.Test_Parsers is
type Test_Parser is
limited new XML.SAX.Content_Handlers.SAX_Content_Handler with private;
private
type Test_Parser is
limited new XML.SAX.Content_Handlers.SAX_Content_Handler with record
Ignore : Natural := 0;
Previous : DOMConf.Scripts.Instruction_Access;
Script : DOMConf.Scripts.Instruction_Access;
end record;
overriding function Error_String
(Self : Test_Parser) return League.Strings.Universal_String;
overriding procedure Start_Element
(Self : in out Test_Parser;
Namespace_URI : League.Strings.Universal_String;
Local_Name : League.Strings.Universal_String;
Qualified_Name : League.Strings.Universal_String;
Attributes : XML.SAX.Attributes.SAX_Attributes;
Success : in out Boolean);
overriding procedure End_Element
(Self : in out Test_Parser;
Namespace_URI : League.Strings.Universal_String;
Local_Name : League.Strings.Universal_String;
Qualified_Name : League.Strings.Universal_String;
Success : in out Boolean);
end DOMConf.Test_Parsers;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.