HDLRuby 2.6.5 → 2.6.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -609,7 +609,8 @@ module HDLRuby::High
609
609
  # possible arguments +args+.
610
610
  def instantiate(i_name,*args)
611
611
  # Create the eigen type.
612
- eigen = self.expand(High.names_create(i_name.to_s + ":T"), *args)
612
+ # eigen = self.expand(High.names_create(i_name.to_s + ":T"), *args)
613
+ eigen = self.expand(HDLRuby.uniq_name(i_name.to_s + ":T"), *args)
613
614
 
614
615
  # Create the instance and sets its eigen system to +eigen+.
615
616
  instance = @instance_class.new(i_name,eigen)
@@ -758,11 +759,13 @@ module HDLRuby::High
758
759
  "Cannot convert a system without a name to HDLRuby::Low."
759
760
  end
760
761
  # Create the resulting low system type.
761
- systemTL = HDLRuby::Low::SystemT.new(High.names_create(name),
762
+ # systemTL = HDLRuby::Low::SystemT.new(High.names_create(name),
763
+ systemTL = HDLRuby::Low::SystemT.new(HDLRuby.uniq_name(name),
762
764
  self.scope.to_low)
763
- # For debugging: set the source high object
764
- systemTL.properties[:low2high] = self.hdr_id
765
- self.properties[:high2low] = systemTL
765
+ # puts "New low from system #{self.name}: #{systemTL.name}"
766
+ # # For debugging: set the source high object
767
+ # systemTL.properties[:low2high] = self.hdr_id
768
+ # self.properties[:high2low] = systemTL
766
769
 
767
770
  # Fills the interface of the new system
768
771
  # from the included systems.
@@ -1308,9 +1311,9 @@ module HDLRuby::High
1308
1311
  # Create the resulting low scope.
1309
1312
  # scopeL = HDLRuby::Low::Scope.new()
1310
1313
  scopeL = HDLRuby::Low::Scope.new(self.name)
1311
- # For debugging: set the source high object
1312
- scopeL.properties[:low2high] = self.hdr_id
1313
- self.properties[:high2low] = scopeL
1314
+ # # For debugging: set the source high object
1315
+ # scopeL.properties[:low2high] = self.hdr_id
1316
+ # self.properties[:high2low] = scopeL
1314
1317
 
1315
1318
  # Push the private namespace for the low generation.
1316
1319
  High.space_push(@namespace)
@@ -1542,9 +1545,9 @@ module HDLRuby::High
1542
1545
  def to_low(name = self.name)
1543
1546
  # return HDLRuby::Low::Type.new(name)
1544
1547
  typeL = HDLRuby::Low::Type.new(name)
1545
- # For debugging: set the source high object
1546
- typeL.properties[:low2high] = self.hdr_id
1547
- self.properties[:high2low] = typeL
1548
+ # # For debugging: set the source high object
1549
+ # typeL.properties[:low2high] = self.hdr_id
1550
+ # self.properties[:high2low] = typeL
1548
1551
  return typeL
1549
1552
  end
1550
1553
  end
@@ -1696,9 +1699,9 @@ module HDLRuby::High
1696
1699
  def to_low(name = self.name)
1697
1700
  # return HDLRuby::Low::TypeDef.new(name,self.def.to_low)
1698
1701
  typeDefL = HDLRuby::Low::TypeDef.new(name,self.def.to_low)
1699
- # For debugging: set the source high object
1700
- typeDefL.properties[:low2high] = self.hdr_id
1701
- self.properties[:high2low] = typeDefL
1702
+ # # For debugging: set the source high object
1703
+ # typeDefL.properties[:low2high] = self.hdr_id
1704
+ # self.properties[:high2low] = typeDefL
1702
1705
  return typeDefL
1703
1706
  end
1704
1707
  end
@@ -1749,9 +1752,9 @@ module HDLRuby::High
1749
1752
  def to_low(name = self.name)
1750
1753
  # return HDLRuby::Low::TypeDef.new(name,self.def.to_low)
1751
1754
  typeDefL = HDLRuby::Low::TypeDef.new(name,self.def.to_low)
1752
- # For debugging: set the source high object
1753
- typeDefL.properties[:low2high] = self.hdr_id
1754
- self.properties[:high2low] = typeDefL
1755
+ # # For debugging: set the source high object
1756
+ # typeDefL.properties[:low2high] = self.hdr_id
1757
+ # self.properties[:high2low] = typeDefL
1755
1758
  return typeDefL
1756
1759
  end
1757
1760
  end
@@ -1767,9 +1770,9 @@ module HDLRuby::High
1767
1770
  # self.range.to_low)
1768
1771
  typeVectorL = HDLRuby::Low::TypeVector.new(name,self.base.to_low,
1769
1772
  self.range.to_low)
1770
- # For debugging: set the source high object
1771
- typeVectorL.properties[:low2high] = self.hdr_id
1772
- self.properties[:high2low] = typeVectorL
1773
+ # # For debugging: set the source high object
1774
+ # typeVectorL.properties[:low2high] = self.hdr_id
1775
+ # self.properties[:high2low] = typeVectorL
1773
1776
  return typeVectorL
1774
1777
  end
1775
1778
  end
@@ -1847,9 +1850,9 @@ module HDLRuby::High
1847
1850
  # *@types.map { |type| type.to_low } )
1848
1851
  typeTupleL = HDLRuby::Low::TypeTuple.new(name,self.direction,
1849
1852
  *@types.map { |type| type.to_low } )
1850
- # For debugging: set the source high object
1851
- typeTupleL.properties[:low2high] = self.hdr_id
1852
- self.properties[:high2low] = typeTupleL
1853
+ # # For debugging: set the source high object
1854
+ # typeTupleL.properties[:low2high] = self.hdr_id
1855
+ # self.properties[:high2low] = typeTupleL
1853
1856
  return typeTupleL
1854
1857
  end
1855
1858
  end
@@ -1868,9 +1871,9 @@ module HDLRuby::High
1868
1871
  # @types.map { |name,type| [name,type.to_low] } )
1869
1872
  typeStructL = HDLRuby::Low::TypeStruct.new(name,self.direction,
1870
1873
  @types.map { |name,type| [name,type.to_low] } )
1871
- # For debugging: set the source high object
1872
- typeStructL.properties[:low2high] = self.hdr_id
1873
- self.properties[:high2low] = typeStructL
1874
+ # # For debugging: set the source high object
1875
+ # typeStructL.properties[:low2high] = self.hdr_id
1876
+ # self.properties[:high2low] = typeStructL
1874
1877
  return typeStructL
1875
1878
  end
1876
1879
  end
@@ -2108,9 +2111,9 @@ module HDLRuby::High
2108
2111
  # Creates the resulting HDLRuby::Low instance
2109
2112
  systemIL = HDLRuby::Low::SystemI.new(High.names_create(name),
2110
2113
  systemTL)
2111
- # For debugging: set the source high object
2112
- systemIL.properties[:low2high] = self.hdr_id
2113
- self.properties[:high2low] = systemIL
2114
+ # # For debugging: set the source high object
2115
+ # systemIL.properties[:low2high] = self.hdr_id
2116
+ # self.properties[:high2low] = systemIL
2114
2117
  # Adds the other systemTs.
2115
2118
  self.each_systemT do |systemT|
2116
2119
  systemIL.add_systemT(systemT.to_low) unless systemT == self.systemT
@@ -2136,9 +2139,9 @@ module HDLRuby::High
2136
2139
  lump = lump.respond_to?(:to_low) ? lump.to_low : lump.to_s
2137
2140
  lump
2138
2141
  end)
2139
- # For debugging: set the source high object
2140
- chunkL.properties[:low2high] = self.hdr_id
2141
- self.properties[:high2low] = chunkL
2142
+ # # For debugging: set the source high object
2143
+ # chunkL.properties[:low2high] = self.hdr_id
2144
+ # self.properties[:high2low] = chunkL
2142
2145
  return chunkL
2143
2146
  end
2144
2147
  end
@@ -2150,9 +2153,9 @@ module HDLRuby::High
2150
2153
  def to_low
2151
2154
  # Create the resulting code.
2152
2155
  codeL = HDLRuby::Low::Code.new
2153
- # For debugging: set the source high object
2154
- codeL.properties[:low2high] = self.hdr_id
2155
- self.properties[:high2low] = codeL
2156
+ # # For debugging: set the source high object
2157
+ # codeL.properties[:low2high] = self.hdr_id
2158
+ # self.properties[:high2low] = codeL
2156
2159
  # Add the low-level events.
2157
2160
  self.each_event { |event| codeL.add_event(event.to_low) }
2158
2161
  # Add the low-level code chunks.
@@ -2244,9 +2247,9 @@ module HDLRuby::High
2244
2247
  ifL = HDLRuby::Low::If.new(self.condition.to_low,
2245
2248
  self.yes.to_low,noL)
2246
2249
  self.each_noif {|cond,block| ifL.add_noif(cond.to_low,block.to_low)}
2247
- # For debugging: set the source high object
2248
- ifL.properties[:low2high] = self.hdr_id
2249
- self.properties[:high2low] = ifL
2250
+ # # For debugging: set the source high object
2251
+ # ifL.properties[:low2high] = self.hdr_id
2252
+ # self.properties[:high2low] = ifL
2250
2253
  return ifL
2251
2254
  end
2252
2255
  end
@@ -2269,9 +2272,9 @@ module HDLRuby::High
2269
2272
  # self.statement.to_low)
2270
2273
  whenL = HDLRuby::Low::When.new(self.match.to_low,
2271
2274
  self.statement.to_low)
2272
- # For debugging: set the source high object
2273
- whenL.properties[:low2high] = self.hdr_id
2274
- self.properties[:high2low] = whenL
2275
+ # # For debugging: set the source high object
2276
+ # whenL.properties[:low2high] = self.hdr_id
2277
+ # self.properties[:high2low] = whenL
2275
2278
  return whenL
2276
2279
  end
2277
2280
  end
@@ -2317,9 +2320,9 @@ module HDLRuby::High
2317
2320
  def to_low
2318
2321
  # Create the low level case.
2319
2322
  caseL = HDLRuby::Low::Case.new(@value.to_low)
2320
- # For debugging: set the source high object
2321
- caseL.properties[:low2high] = self.hdr_id
2322
- self.properties[:high2low] = caseL
2323
+ # # For debugging: set the source high object
2324
+ # caseL.properties[:low2high] = self.hdr_id
2325
+ # self.properties[:high2low] = caseL
2323
2326
  # Add each when case.
2324
2327
  self.each_when do |w|
2325
2328
  caseL.add_when(w.to_low)
@@ -2348,9 +2351,9 @@ module HDLRuby::High
2348
2351
  def to_low
2349
2352
  # return HDLRuby::Low::Delay.new(self.value, self.unit)
2350
2353
  delayL = HDLRuby::Low::Delay.new(self.value, self.unit)
2351
- # For debugging: set the source high object
2352
- delayL.properties[:low2high] = self.hdr_id
2353
- self.properties[:high2low] = delayL
2354
+ # # For debugging: set the source high object
2355
+ # delayL.properties[:low2high] = self.hdr_id
2356
+ # self.properties[:high2low] = delayL
2354
2357
  return delayL
2355
2358
  end
2356
2359
  end
@@ -2364,9 +2367,9 @@ module HDLRuby::High
2364
2367
  def to_low
2365
2368
  # return HDLRuby::Low::TimeWait.new(self.delay.to_low)
2366
2369
  timeWaitL = HDLRuby::Low::TimeWait.new(self.delay.to_low)
2367
- # For debugging: set the source high object
2368
- timeWaitL.properties[:low2high] = self.hdr_id
2369
- self.properties[:high2low] = timeWaitL
2370
+ # # For debugging: set the source high object
2371
+ # timeWaitL.properties[:low2high] = self.hdr_id
2372
+ # self.properties[:high2low] = timeWaitL
2370
2373
  return timeWaitL
2371
2374
  end
2372
2375
  end
@@ -2383,9 +2386,9 @@ module HDLRuby::High
2383
2386
  # self.delay.to_low)
2384
2387
  timeRepeatL = HDLRuby::Low::TimeRepeat.new(self.statement.to_low,
2385
2388
  self.delay.to_low)
2386
- # For debugging: set the source high object
2387
- timeRepeatL.properties[:low2high] = self.hdr_id
2388
- self.properties[:high2low] = timeRepeatL
2389
+ # # For debugging: set the source high object
2390
+ # timeRepeatL.properties[:low2high] = self.hdr_id
2391
+ # self.properties[:high2low] = timeRepeatL
2389
2392
  return timeRepeatL
2390
2393
  end
2391
2394
  end
@@ -2655,7 +2658,6 @@ module HDLRuby::High
2655
2658
  end
2656
2659
  end
2657
2660
 
2658
-
2659
2661
  # Converts to a select operator using current expression as
2660
2662
  # condition for one of the +choices+.
2661
2663
  #
@@ -2671,6 +2673,7 @@ module HDLRuby::High
2671
2673
  end
2672
2674
 
2673
2675
 
2676
+
2674
2677
  # Methods for conversion for HDLRuby::Low: type processing, flattening
2675
2678
  # and so on
2676
2679
 
@@ -2743,9 +2746,9 @@ module HDLRuby::High
2743
2746
  def to_low
2744
2747
  # return HDLRuby::Low::Cast.new(self.type.to_low,self.child.to_low)
2745
2748
  castL =HDLRuby::Low::Cast.new(self.type.to_low,self.child.to_low)
2746
- # For debugging: set the source high object
2747
- castL.properties[:low2high] = self.hdr_id
2748
- self.properties[:high2low] = castL
2749
+ # # For debugging: set the source high object
2750
+ # castL.properties[:low2high] = self.hdr_id
2751
+ # self.properties[:high2low] = castL
2749
2752
  return castL
2750
2753
  end
2751
2754
  end
@@ -2767,9 +2770,9 @@ module HDLRuby::High
2767
2770
  # self.child.to_low)
2768
2771
  unaryL = HDLRuby::Low::Unary.new(self.type.to_low, self.operator,
2769
2772
  self.child.to_low)
2770
- # For debugging: set the source high object
2771
- unaryL.properties[:low2high] = self.hdr_id
2772
- self.properties[:high2low] = unaryL
2773
+ # # For debugging: set the source high object
2774
+ # unaryL.properties[:low2high] = self.hdr_id
2775
+ # self.properties[:high2low] = unaryL
2773
2776
  return unaryL
2774
2777
  end
2775
2778
  end
@@ -2792,9 +2795,9 @@ module HDLRuby::High
2792
2795
  # self.left.to_low, self.right.to_low)
2793
2796
  binaryL = HDLRuby::Low::Binary.new(self.type.to_low, self.operator,
2794
2797
  self.left.to_low, self.right.to_low)
2795
- # For debugging: set the source high object
2796
- binaryL.properties[:low2high] = self.hdr_id
2797
- self.properties[:high2low] = binaryL
2798
+ # # For debugging: set the source high object
2799
+ # binaryL.properties[:low2high] = self.hdr_id
2800
+ # self.properties[:high2low] = binaryL
2798
2801
  return binaryL
2799
2802
  end
2800
2803
  end
@@ -2827,9 +2830,9 @@ module HDLRuby::High
2827
2830
  *self.each_choice.map do |choice|
2828
2831
  choice.to_low
2829
2832
  end)
2830
- # For debugging: set the source high object
2831
- selectL.properties[:low2high] = self.hdr_id
2832
- self.properties[:high2low] = selectL
2833
+ # # For debugging: set the source high object
2834
+ # selectL.properties[:low2high] = self.hdr_id
2835
+ # self.properties[:high2low] = selectL
2833
2836
  return selectL
2834
2837
  end
2835
2838
  end
@@ -2861,9 +2864,9 @@ module HDLRuby::High
2861
2864
  expr.to_low
2862
2865
  end
2863
2866
  )
2864
- # For debugging: set the source high object
2865
- concatL.properties[:low2high] = self.hdr_id
2866
- self.properties[:high2low] = concatL
2867
+ # # For debugging: set the source high object
2868
+ # concatL.properties[:low2high] = self.hdr_id
2869
+ # self.properties[:high2low] = concatL
2867
2870
  return concatL
2868
2871
  end
2869
2872
  end
@@ -2905,9 +2908,9 @@ module HDLRuby::High
2905
2908
  # Create and return the resulting low-level value
2906
2909
  # return HDLRuby::Low::Value.new(self.type.to_low,self.content)
2907
2910
  valueL = HDLRuby::Low::Value.new(self.type.to_low,self.content)
2908
- # For debugging: set the source high object
2909
- valueL.properties[:low2high] = self.hdr_id
2910
- self.properties[:high2low] = valueL
2911
+ # # For debugging: set the source high object
2912
+ # valueL.properties[:low2high] = self.hdr_id
2913
+ # self.properties[:high2low] = valueL
2911
2914
  return valueL
2912
2915
  end
2913
2916
 
@@ -3013,9 +3016,9 @@ module HDLRuby::High
3013
3016
  # puts "to_low with base=#{@base} @object=#{@object}"
3014
3017
  refNameL = HDLRuby::Low::RefName.new(self.type.to_low,
3015
3018
  @base.to_ref.to_low,@object.name)
3016
- # For debugging: set the source high object
3017
- refNameL.properties[:low2high] = self.hdr_id
3018
- self.properties[:high2low] = refNameL
3019
+ # # For debugging: set the source high object
3020
+ # refNameL.properties[:low2high] = self.hdr_id
3021
+ # self.properties[:high2low] = refNameL
3019
3022
  return refNameL
3020
3023
  end
3021
3024
 
@@ -3053,9 +3056,9 @@ module HDLRuby::High
3053
3056
  ref.to_low
3054
3057
  end
3055
3058
  )
3056
- # For debugging: set the source high object
3057
- refConcatL.properties[:low2high] = self.hdr_id
3058
- self.properties[:high2low] = refConcatL
3059
+ # # For debugging: set the source high object
3060
+ # refConcatL.properties[:low2high] = self.hdr_id
3061
+ # self.properties[:high2low] = refConcatL
3059
3062
  return refConcatL
3060
3063
  end
3061
3064
  end
@@ -3077,9 +3080,9 @@ module HDLRuby::High
3077
3080
  # self.ref.to_low,self.index.to_low)
3078
3081
  refIndexL = HDLRuby::Low::RefIndex.new(self.type.to_low,
3079
3082
  self.ref.to_low,self.index.to_low)
3080
- # For debugging: set the source high object
3081
- refIndexL.properties[:low2high] = self.hdr_id
3082
- self.properties[:high2low] = refIndexL
3083
+ # # For debugging: set the source high object
3084
+ # refIndexL.properties[:low2high] = self.hdr_id
3085
+ # self.properties[:high2low] = refIndexL
3083
3086
  return refIndexL
3084
3087
  end
3085
3088
  end
@@ -3101,9 +3104,9 @@ module HDLRuby::High
3101
3104
  # self.ref.to_low,self.range.to_low)
3102
3105
  refRangeL = HDLRuby::Low::RefRange.new(self.type.to_low,
3103
3106
  self.ref.to_low,self.range.to_low)
3104
- # For debugging: set the source high object
3105
- refRangeL.properties[:low2high] = self.hdr_id
3106
- self.properties[:high2low] = refRangeL
3107
+ # # For debugging: set the source high object
3108
+ # refRangeL.properties[:low2high] = self.hdr_id
3109
+ # self.properties[:high2low] = refRangeL
3107
3110
  return refRangeL
3108
3111
  end
3109
3112
  end
@@ -3124,9 +3127,9 @@ module HDLRuby::High
3124
3127
  # self.ref.to_low,self.name)
3125
3128
  refNameL = HDLRuby::Low::RefName.new(self.type.to_low,
3126
3129
  self.ref.to_low,self.name)
3127
- # For debugging: set the source high object
3128
- refNameL.properties[:low2high] = self.hdr_id
3129
- self.properties[:high2low] = refNameL
3130
+ # # For debugging: set the source high object
3131
+ # refNameL.properties[:low2high] = self.hdr_id
3132
+ # self.properties[:high2low] = refNameL
3130
3133
  return refNameL
3131
3134
  end
3132
3135
  end
@@ -3161,9 +3164,9 @@ module HDLRuby::High
3161
3164
  def to_low
3162
3165
  # return HDLRuby::Low::RefThis.new
3163
3166
  refThisL = HDLRuby::Low::RefThis.new
3164
- # For debugging: set the source high object
3165
- refThisL.properties[:low2high] = self.hdr_id
3166
- self.properties[:high2low] = refThisL
3167
+ # # For debugging: set the source high object
3168
+ # refThisL.properties[:low2high] = self.hdr_id
3169
+ # self.properties[:high2low] = refThisL
3167
3170
  return refThisL
3168
3171
  end
3169
3172
  end
@@ -3234,9 +3237,9 @@ module HDLRuby::High
3234
3237
  def to_low
3235
3238
  # return HDLRuby::Low::Event.new(self.type,self.ref.to_low)
3236
3239
  eventL = HDLRuby::Low::Event.new(self.type,self.ref.to_low)
3237
- # For debugging: set the source high object
3238
- eventL.properties[:low2high] = self.hdr_id
3239
- self.properties[:high2low] = eventL
3240
+ # # For debugging: set the source high object
3241
+ # eventL.properties[:low2high] = self.hdr_id
3242
+ # self.properties[:high2low] = eventL
3240
3243
  return eventL
3241
3244
  end
3242
3245
  end
@@ -3277,9 +3280,9 @@ module HDLRuby::High
3277
3280
  # self.right.to_low)
3278
3281
  transmitL = HDLRuby::Low::Transmit.new(self.left.to_low,
3279
3282
  self.right.to_low)
3280
- # For debugging: set the source high object
3281
- transmitL.properties[:low2high] = self.hdr_id
3282
- self.properties[:high2low] = transmitL
3283
+ # # For debugging: set the source high object
3284
+ # transmitL.properties[:low2high] = self.hdr_id
3285
+ # self.properties[:high2low] = transmitL
3283
3286
  return transmitL
3284
3287
  end
3285
3288
  end
@@ -3370,9 +3373,9 @@ module HDLRuby::High
3370
3373
  # self.right.to_low)
3371
3374
  connectionL = HDLRuby::Low::Connection.new(self.left.to_low,
3372
3375
  self.right.to_low)
3373
- # For debugging: set the source high object
3374
- connectionL.properties[:low2high] = self.hdr_id
3375
- self.properties[:high2low] = connectionL
3376
+ # # For debugging: set the source high object
3377
+ # connectionL.properties[:low2high] = self.hdr_id
3378
+ # self.properties[:high2low] = connectionL
3376
3379
  return connectionL
3377
3380
  end
3378
3381
  end
@@ -3484,9 +3487,9 @@ module HDLRuby::High
3484
3487
  def to_low(name = self.name)
3485
3488
  # return HDLRuby::Low::SignalI.new(name,self.type.to_low)
3486
3489
  signalIL = HDLRuby::Low::SignalI.new(name,self.type.to_low)
3487
- # For debugging: set the source high object
3488
- signalIL.properties[:low2high] = self.hdr_id
3489
- self.properties[:high2low] = signalIL
3490
+ # # For debugging: set the source high object
3491
+ # signalIL.properties[:low2high] = self.hdr_id
3492
+ # self.properties[:high2low] = signalIL
3490
3493
  return signalIL
3491
3494
  end
3492
3495
  end
@@ -3550,9 +3553,9 @@ module HDLRuby::High
3550
3553
  # self.value.to_low)
3551
3554
  signalCL = HDLRuby::Low::SignalC.new(name,self.type.to_low,
3552
3555
  self.value.to_low)
3553
- # For debugging: set the source high object
3554
- signalCL.properties[:low2high] = self.hdr_id
3555
- self.properties[:high2low] = signalCL
3556
+ # # For debugging: set the source high object
3557
+ # signalCL.properties[:low2high] = self.hdr_id
3558
+ # self.properties[:high2low] = signalCL
3556
3559
  return signalCL
3557
3560
  end
3558
3561
  end
@@ -3763,9 +3766,9 @@ module HDLRuby::High
3763
3766
  def to_low
3764
3767
  # Create the resulting block
3765
3768
  blockL = HDLRuby::Low::Block.new(self.mode)
3766
- # For debugging: set the source high object
3767
- blockL.properties[:low2high] = self.hdr_id
3768
- self.properties[:high2low] = blockL
3769
+ # # For debugging: set the source high object
3770
+ # blockL.properties[:low2high] = self.hdr_id
3771
+ # self.properties[:high2low] = blockL
3769
3772
  # Push the namespace for the low generation.
3770
3773
  High.space_push(@namespace)
3771
3774
  # Pushes on the name stack for converting the internals of
@@ -3833,9 +3836,9 @@ module HDLRuby::High
3833
3836
  def to_low
3834
3837
  # Create the resulting block
3835
3838
  blockL = HDLRuby::Low::TimeBlock.new(self.mode)
3836
- # For debugging: set the source high object
3837
- blockL.properties[:low2high] = self.hdr_id
3838
- self.properties[:high2low] = blockL
3839
+ # # For debugging: set the source high object
3840
+ # blockL.properties[:low2high] = self.hdr_id
3841
+ # self.properties[:high2low] = blockL
3839
3842
  # Add the inner signals
3840
3843
  self.each_inner { |inner| blockL.add_inner(inner.to_low) }
3841
3844
  # Add the statements
@@ -3927,9 +3930,9 @@ module HDLRuby::High
3927
3930
  eventLs = self.each_event.map { |event| event.to_low }
3928
3931
  # Create and return the resulting low level behavior.
3929
3932
  behaviorL = HDLRuby::Low::Behavior.new(blockL)
3930
- # For debugging: set the source high object
3931
- behaviorL.properties[:low2high] = self.hdr_id
3932
- self.properties[:high2low] = behaviorL
3933
+ # # For debugging: set the source high object
3934
+ # behaviorL.properties[:low2high] = self.hdr_id
3935
+ # self.properties[:high2low] = behaviorL
3933
3936
  eventLs.each(&behaviorL.method(:add_event))
3934
3937
  return behaviorL
3935
3938
  end
@@ -3957,9 +3960,9 @@ module HDLRuby::High
3957
3960
  eventLs = self.each_event.map { |event| event.to_low }
3958
3961
  # Create and return the resulting low level behavior.
3959
3962
  timeBehaviorL = HDLRuby::Low::TimeBehavior.new(blockL)
3960
- # For debugging: set the source high object
3961
- timeBehaviorL.properties[:low2high] = self.hdr_id
3962
- self.properties[:high2low] = timeBehaviorL
3963
+ # # For debugging: set the source high object
3964
+ # timeBehaviorL.properties[:low2high] = self.hdr_id
3965
+ # self.properties[:high2low] = timeBehaviorL
3963
3966
  eventLs.each(&timeBehaviorL.method(:add_event))
3964
3967
  return timeBehaviorL
3965
3968
  end
@@ -4234,6 +4237,22 @@ module HDLRuby::High
4234
4237
  # end
4235
4238
  # end
4236
4239
 
4240
+ # Extends the TrueClass class for computing for conversion to expression.
4241
+ class ::TrueClass
4242
+ # Converts to a new high-level expression.
4243
+ def to_expr
4244
+ return Value.new(Integer,1)
4245
+ end
4246
+ end
4247
+
4248
+ # Extends the FalseClass class for computing for conversion to expression.
4249
+ class ::FalseClass
4250
+ # Converts to a new high-level expression.
4251
+ def to_expr
4252
+ return Value.new(Integer,0)
4253
+ end
4254
+ end
4255
+
4237
4256
  # Extends the Integer class for computing for conversion to expression.
4238
4257
  class ::Integer
4239
4258
  # Converts to a new high-level expression.