Home > Community > Forums > Functional Verification > defining and using custom data-types

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 defining and using custom data-types 

Last post Wed, May 2 2012 9:31 AM by Shalom B. 1 replies.
Started by skillseeker 07 Oct 2011 09:41 AM. Topic has 1 replies and 3408 views
Page 1 of 1 (2 items)
Sort Posts:
  • Fri, Oct 7 2011 9:41 AM

    defining and using custom data-types Reply

    Would like to define custom datatypes something like this...

    typedef struct {

      real vm;

     real im;

     real v;

    } vi_l;

    module ( input logic clk, inout vi_l vdd, inout vi_l vss, output real vout);

    I am getting declaration errors in system verilog. Can you give me an idea how to get this done.

     

    Thanks

    -D  

     

    • Post Points: 20
  • Wed, May 2 2012 9:31 AM

    • Shalom B
    • Top 200 Contributor
    • Joined on Sun, Jul 13 2008
    • Jerusalem, 00-IL
    • Posts 44
    • Points 595
    Re: defining and using custom data-types Reply

    The problem, or at least part of it, is that the struct contains members of type real. Variables can be of real type, but wires cannot. The port declaration uses this type for a port of direction inout. inout can only be wires, not variables.

     

    Shalom

    Shalom.Bresticker@intel.com
    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by skillseeker at 07 Oct 2011 09:41 AM. Topic has 1 replies.