File: pinout_h.sv

package info (click to toggle)
verilator 5.038-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 162,552 kB
  • sloc: cpp: 139,204; python: 20,931; ansic: 10,222; yacc: 6,000; lex: 1,925; makefile: 1,260; sh: 494; perl: 282; fortran: 22
file content (68 lines) | stat: -rw-r--r-- 1,722 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// DESCRIPTION: Verilator: Large test for SystemVerilog

// This file ONLY is placed into the Public Domain, for any use,
// without warranty, 2012.
// SPDX-License-Identifier: CC0-1.0

// Contributed by M W Lund, Atmel Corporation.

`ifndef _PINOUT_H_SV_
 `define _PINOUT_H_SV_

// *****************************************************************************
// Structs/Unions
// *****************************************************************************

// **** Pin Descriptor ****

// - Pin Descriptor -
typedef struct packed
{
 t_pinid   id;
 t_padtype padtype;
 int       aux;
} t_pin_descriptor;



// *****************************************************************************
// Pinout
// *****************************************************************************

// **** Preferred Solution !!!! ****
localparam t_pin_descriptor
  pinout[ 1: 6]
  = '{
      '{default:0, id:PINID_A0,   padtype:PADTYPE_GPIO, aux:1},
      '{default:0, id:PINID_A1,   padtype:PADTYPE_GPIO},
      '{default:0, id:PINID_A2,   padtype:PADTYPE_GPIO},
      '{default:0, id:PINID_D0,   padtype:PADTYPE_GPIO},
      '{default:0, id:PINID_VDD0, padtype:PADTYPE_VDD},
      '{default:0, id:PINID_GND0, padtype:PADTYPE_GND}
      };


// **** Workaround !!!! ****
typedef enum int
{
 pinout_wa_id = 1,
 pinout_wa_padtype,
 pinout_wa_aux
 } t_pinout_wa;

localparam int pinout_size = 6;
localparam int pinout_wa[1:pinout_size][pinout_wa_id:pinout_wa_aux] =
'{
  '{PINID_A0,   PADTYPE_GPIO, 0},
  '{PINID_A1,   PADTYPE_GPIO, 0},
  '{PINID_A2,   PADTYPE_GPIO, 0},
  '{PINID_D0,   PADTYPE_GPIO, 0},
  '{PINID_VDD0, PADTYPE_VDD,  0},
  '{PINID_GND0, PADTYPE_GND , 0}
  };



`endif //  `ifndef _PINOUT_H_SV_

// **** End of File ****