Skip to content

Commit

Permalink
Making NULL 0
Browse files Browse the repository at this point in the history
- Fixing testbnench example, pin order was reversed from physical placement order.
  • Loading branch information
aolofsson committed Jul 26, 2024
1 parent b5294c3 commit b4dcf77
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 29 deletions.
15 changes: 8 additions & 7 deletions lambdalib/padring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ Specifies the total number of power sections within one side of the padring. The
### {NO,EA,WE,SO}CELLMAP
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:

* CELLMAP[7:0] = pin number connected to cell
* CELLMAP[15:8] = pin number for complementary pad for differential cells
* CELLMAP[23:16] = cell type (see ./la_padring.vh)
* SECTION[31:24] = padring power section number connected to cell
* PROP[39:32] = property passed to technology specific iolib implementation
* PIN[7:0] = CELLMAP[7:0] = pin number connected to cell
* COMP[7:0] = CELLMAP[15:8] = pin number for complementary pad for differential cells
* TYPE[7:0] = CELLMAP[23:16] = cell type (see ./la_padring.vh)
* SECTION[7:0] = CELLMAP[31:24] = padring power section number connected to cell
* PROP[7:0] = CELLMAP[39:32] = property passed to technology specific iolib implementation

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.

### CFGW
Specifies the width of the configuration bus of the io cell. For a description of uses of `CFGW`, see [IOLIB](../../iolib/README.md).
Expand Down Expand Up @@ -88,10 +90,9 @@ la_iopadring #(.CFGW(CFGW),
.NO_CELLMAP(CELLMAP),
.EA_CELLMAP(CELLMAP),
.WE_CELLMAP(CELLMAP),
.SO_CELLMAP(CELLMAP))
.SO_CELLMAP(CELLMAP))
la_iopadring(...)
```
21 changes: 10 additions & 11 deletions lambdalib/padring/rtl/la_iopadring.v
Original file line number Diff line number Diff line change
Expand Up @@ -226,21 +226,20 @@ module tb();
parameter TIMEOUT = PERIOD * 50;

// config
localparam CFGW = 8;
localparam RINGW = 8;
localparam NPINS = 4;
localparam NCELLS = 8;
localparam NSECTIONS = 1;
parameter CFGW = 8;
parameter RINGW = 8;
parameter NPINS = 4;
parameter NCELLS = 8;
parameter NSECTIONS = 1;

// pinmap
localparam [7:0] PIN_IO0 = 8'h00;
localparam [7:0] PIN_AN0 = 8'h01;
localparam [7:0] PIN_RXP = 8'h02;
localparam [7:0] PIN_RXN = 8'h03;
parameter [7:0] PIN_IO0 = 8'h03;
parameter [7:0] PIN_AN0 = 8'h02;
parameter [7:0] PIN_RXN = 8'h01;
parameter [7:0] PIN_RXP = 8'h00;

localparam NULL = 8'h0;

localparam [40*NPINS-1:0] CELLMAP =
parameter [40*NCELLS-1:0] CELLMAP =
{{NULL, NULL, LA_VSS, NULL, NULL},
{NULL, NULL, LA_BIDIR, NULL, PIN_IO0},
{NULL, NULL, LA_ANALOG, NULL, PIN_AN0},
Expand Down
25 changes: 14 additions & 11 deletions lambdalib/padring/rtl/la_iopadring.vh
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
/*****************************************************************************
* Function: Padcell Enumeration
* Function: Padring Generator Enumeration
* Copyright: Lambda Project Authors. All rights Reserved.
* License: MIT (see LICENSE file in Lambda repository)
****************************************************************************/

// signal
localparam [7:0] LA_BIDIR = 8'h00;
localparam [7:0] LA_INPUT = 8'h01;
localparam [7:0] LA_OUTPUT = 8'h02;
localparam [7:0] LA_ANALOG = 8'h03;
localparam [7:0] LA_XTAL = 8'h04;
localparam [7:0] LA_RXDIFF = 8'h05;
localparam [7:0] LA_TXDIFF = 8'h06;
// NULL (unused, catchall)
localparam [7:0] NULL = 8'h00;

// signals
localparam [7:0] LA_BIDIR = 8'h01;
localparam [7:0] LA_INPUT = 8'h02;
localparam [7:0] LA_OUTPUT = 8'h03;
localparam [7:0] LA_ANALOG = 8'h04;
localparam [7:0] LA_XTAL = 8'h05;
localparam [7:0] LA_RXDIFF = 8'h06;
localparam [7:0] LA_TXDIFF = 8'h07;

// supplies
localparam [7:0] LA_VDDIO = 8'h10;
localparam [7:0] LA_VSSIO = 8'h11;
// power
localparam [7:0] LA_VDD = 8'h12;
localparam [7:0] LA_VSS = 8'h13;
localparam [7:0] LA_VDDA = 8'h14;
localparam [7:0] LA_VSSA = 8'h15;
localparam [7:0] LA_POC = 8'h16;
localparam [7:0] LA_CUT = 8'h17;
localparam [7:0] LA_NULL = 8'hFF;

0 comments on commit b4dcf77

Please sign in to comment.