External Names for Types

Proposal Information

  • Current Owner: JimLewis, ...
  • Contributors: JimLewis, ...
  • Date Proposed: 2014-May-26
  • Date Last Updated: 2014-May-26
  • Priority:
  • Complexity:
  • Focus: Testbench
  • Related Issues: None
  • Competing Issues: None

Requirement Summary

Create external names to types.

Rationale

For a testbench to do actions based on the state of a statemachine requires knowledge type. Unfortunately the type is most often defined within the RTL code itself. As a result, there is currently no way to access it.

Proposal

Extend external_name to include external_type_name:

external_name ::=
    external_constant_name
    | external_signal_name
    | external_variable_name
    | external_type_name

Define external_type_name as:

external_type_name ::=  <>

Usage:

In some RTL block:

architecture rtl of block1 is 
  type RingType is (S0, S1, S2, S3) ; 
begin 
  ...

In a testbench block:

architecture Test1 of Testbench is
  alias RingType is <<type .Testbench.U_RTL_TOP.Block1.RingType>>; 
...
begin

In a package:

package TbPkg is 
  alias RingType is <<type .Testbench.U_RTL_TOP.Block1.RingType>>; 
...
end package TbPkg ;

Alternative Proposal

Directly reference into the entity - similar to a package and not similar to an elaborated path.   Needs syntax work, example only for concepts:

package TbPkg is 
  alias RingType is EntityName.ArchName.RingType ; 
...
end package TbPkg ;

Would create a compile dependency.

Comments

-- LievenLemiengre - 2015-06-04

From a compiler POV this is extremely hard. You would have to do elaboration during type resolving.

Supporters

JimLewis

-- RyanHinton - 2014-06-18

-- Brent Hayhoe - 2014-06-19

-- TorstenMeissner - 2016-05-18

Edit | Attach | Print version | History: r8 | r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2020-02-17 - 15:34:53 - TWikiGuest
 
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback