Skip to content

Commit b4dcf77

Browse files
committed
Making NULL 0
- Fixing testbnench example, pin order was reversed from physical placement order.
1 parent b5294c3 commit b4dcf77

File tree

3 files changed

+32
-29
lines changed

3 files changed

+32
-29
lines changed

lambdalib/padring/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ Specifies the total number of power sections within one side of the padring. The
1818
### {NO,EA,WE,SO}CELLMAP
1919
Specifies the type of cells, pin connections, properties, and power connections of all cells in the padring with the exception of filler cells. The physical placement of the cells within the padring shall be done in the order dictated by `CELLMAP`. The CELLMAP is a vector of size NCELLS * 40, with the 40bit vector split into the following fields:
2020

21-
* CELLMAP[7:0] = pin number connected to cell
22-
* CELLMAP[15:8] = pin number for complementary pad for differential cells
23-
* CELLMAP[23:16] = cell type (see ./la_padring.vh)
24-
* SECTION[31:24] = padring power section number connected to cell
25-
* PROP[39:32] = property passed to technology specific iolib implementation
21+
* PIN[7:0] = CELLMAP[7:0] = pin number connected to cell
22+
* COMP[7:0] = CELLMAP[15:8] = pin number for complementary pad for differential cells
23+
* TYPE[7:0] = CELLMAP[23:16] = cell type (see ./la_padring.vh)
24+
* SECTION[7:0] = CELLMAP[31:24] = padring power section number connected to cell
25+
* PROP[7:0] = CELLMAP[39:32] = property passed to technology specific iolib implementation
26+
27+
The header file [la_iopadring.vh](./rtl/la_iopadring.vh) enumerates the cells recognized by the padring generator. `NULL` is a reserved keyword used to specify an empty `CELLMAP` field.
2628

2729
### CFGW
2830
Specifies the width of the configuration bus of the io cell. For a description of uses of `CFGW`, see [IOLIB](../../iolib/README.md).
@@ -88,10 +90,9 @@ la_iopadring #(.CFGW(CFGW),
8890
.NO_CELLMAP(CELLMAP),
8991
.EA_CELLMAP(CELLMAP),
9092
.WE_CELLMAP(CELLMAP),
91-
.SO_CELLMAP(CELLMAP))
93+
.SO_CELLMAP(CELLMAP))
9294
la_iopadring(...)
9395
9496
9597
9698
```
97-

lambdalib/padring/rtl/la_iopadring.v

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -226,21 +226,20 @@ module tb();
226226
parameter TIMEOUT = PERIOD * 50;
227227

228228
// config
229-
localparam CFGW = 8;
230-
localparam RINGW = 8;
231-
localparam NPINS = 4;
232-
localparam NCELLS = 8;
233-
localparam NSECTIONS = 1;
229+
parameter CFGW = 8;
230+
parameter RINGW = 8;
231+
parameter NPINS = 4;
232+
parameter NCELLS = 8;
233+
parameter NSECTIONS = 1;
234234

235235
// pinmap
236-
localparam [7:0] PIN_IO0 = 8'h00;
237-
localparam [7:0] PIN_AN0 = 8'h01;
238-
localparam [7:0] PIN_RXP = 8'h02;
239-
localparam [7:0] PIN_RXN = 8'h03;
236+
parameter [7:0] PIN_IO0 = 8'h03;
237+
parameter [7:0] PIN_AN0 = 8'h02;
238+
parameter [7:0] PIN_RXN = 8'h01;
239+
parameter [7:0] PIN_RXP = 8'h00;
240240

241-
localparam NULL = 8'h0;
242241

243-
localparam [40*NPINS-1:0] CELLMAP =
242+
parameter [40*NCELLS-1:0] CELLMAP =
244243
{{NULL, NULL, LA_VSS, NULL, NULL},
245244
{NULL, NULL, LA_BIDIR, NULL, PIN_IO0},
246245
{NULL, NULL, LA_ANALOG, NULL, PIN_AN0},

lambdalib/padring/rtl/la_iopadring.vh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
/*****************************************************************************
2-
* Function: Padcell Enumeration
2+
* Function: Padring Generator Enumeration
33
* Copyright: Lambda Project Authors. All rights Reserved.
44
* License: MIT (see LICENSE file in Lambda repository)
55
****************************************************************************/
66

7-
// signal
8-
localparam [7:0] LA_BIDIR = 8'h00;
9-
localparam [7:0] LA_INPUT = 8'h01;
10-
localparam [7:0] LA_OUTPUT = 8'h02;
11-
localparam [7:0] LA_ANALOG = 8'h03;
12-
localparam [7:0] LA_XTAL = 8'h04;
13-
localparam [7:0] LA_RXDIFF = 8'h05;
14-
localparam [7:0] LA_TXDIFF = 8'h06;
7+
// NULL (unused, catchall)
8+
localparam [7:0] NULL = 8'h00;
9+
10+
// signals
11+
localparam [7:0] LA_BIDIR = 8'h01;
12+
localparam [7:0] LA_INPUT = 8'h02;
13+
localparam [7:0] LA_OUTPUT = 8'h03;
14+
localparam [7:0] LA_ANALOG = 8'h04;
15+
localparam [7:0] LA_XTAL = 8'h05;
16+
localparam [7:0] LA_RXDIFF = 8'h06;
17+
localparam [7:0] LA_TXDIFF = 8'h07;
18+
19+
// supplies
1520
localparam [7:0] LA_VDDIO = 8'h10;
1621
localparam [7:0] LA_VSSIO = 8'h11;
17-
// power
1822
localparam [7:0] LA_VDD = 8'h12;
1923
localparam [7:0] LA_VSS = 8'h13;
2024
localparam [7:0] LA_VDDA = 8'h14;
2125
localparam [7:0] LA_VSSA = 8'h15;
2226
localparam [7:0] LA_POC = 8'h16;
2327
localparam [7:0] LA_CUT = 8'h17;
24-
localparam [7:0] LA_NULL = 8'hFF;

0 commit comments

Comments
 (0)