2016-08-09 4 views
1

レコード内の変数を制約したい。この変数は、test_vector(レコード)VHDL 2008の整数を制約する方法

type test_vector is record 
      id_dd : integer; 
      stimulus : bit_vector; 
      response : bit_vector; 
     end record test_vector; 

type test_time is record 
      stimulus_time : time; 
      response_delay : delay_length; 
     end record test_time; 

type test_application is record 
      test_to_apply : test_vector; 
      application_time : test_time; 
     end record test_application; 

subtype schedule_test is test_application (test_to_apply ( id_dd (0 to 100) , 
                  stimulus (0 to 7), 
                  response(0 to 9))); 

ModelSimのエラーでをid_ddされている。

Constraint for record element "test_vector.id_dd" (at depth 1) cannot apply to non-composite type (std.STANDARD.INTEGER) 

にはどうすればサブタイプを使用してid_dd制約することができますか?

答えて

0

LRMよると:あなたが見ることができるように

record_constraint ::= 
    (record_element_constraint { , record_element_constraint }) 

record_element_constraint ::= 
    record_element_simple_name element_constraint 

element_constraint ::= 
    array_constraint 
    | record_constraint 

は、要素の制約がrange_constraintすることはできませんが、唯一のarray_constraintまたはrecord_constraint。私はこの制限についての説明を見つけませんでした。 EDAベンダーによって徹底的に実装されたことがありますか?それとも別の正当な理由がありますか?私は知りたいと思うだろう。

関連する問題