Skip to content

Commit d531283

Browse files
authored
Merge pull request #66 from siliconcompiler/type-prop
make ramlib and fpgalib consistent with TYPE<->PROP
2 parents f6fd595 + a3d6a36 commit d531283

File tree

9 files changed

+26
-25
lines changed

9 files changed

+26
-25
lines changed

lambdalib/fpgalib/rtl/la_ble4p0.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
****************************************************************************/
1919

2020
module la_ble4p0
21-
#(parameter TYPE = "DEFAULT" // implementation selector
21+
#(parameter PROP = "DEFAULT" // implementation selector
2222
)
2323
(// logic
2424
input clk, // clock

lambdalib/fpgalib/rtl/la_lut4.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
****************************************************************************/
4242

4343
module la_lut4
44-
#(parameter TYPE = "DEFAULT" // implementation selector
44+
#(parameter PROP = "DEFAULT" // implementation selector
4545
)
4646
(input [3:0] in,
4747
input [15:0] lut,

lambdalib/ramlib/rtl/la_asyncfifo.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
*
88
* This is a wrapper for selecting from a set of hardened memory macros.
99
*
10-
* A synthesizable reference model is used when the TYPE is DEFAULT. The
10+
* A synthesizable reference model is used when the PROP is DEFAULT. The
1111
* synthesizable model does not implement the cfg and test interface and should
1212
* only be used for basic testing and for synthesizing for FPGA devices.
1313
* Advanced ASIC development should rely on complete functional models
1414
* supplied on a per macro basis.
1515
*
1616
* Technologoy specific implementations of "la_dpram" would generally include
1717
* one ore more hardcoded instantiations of RAM modules with a generate
18-
* statement relying on the "TYPE" to select between the list of modules
18+
* statement relying on the "PROP" to select between the list of modules
1919
* at build time.
2020
*
2121
****************************************************************************/
@@ -27,7 +27,7 @@ module la_asyncfifo #(
2727
parameter CTRLW = 1, // width of asic ctrl interface
2828
parameter TESTW = 1, // width of asic teset interface
2929
parameter CHAOS = 0, // generates random full logic when set
30-
parameter TYPE = "DEFAULT" // Pass through variable for hard macro
30+
parameter PROP = "DEFAULT" // Pass through variable for hard macro
3131
) ( // write port
3232
input wr_clk,
3333
input wr_nreset,

lambdalib/ramlib/rtl/la_dpram.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
*
88
* This is a wrapper for selecting from a set of hardened memory macros.
99
*
10-
* A synthesizable reference model is used when the TYPE is DEFAULT. The
10+
* A synthesizable reference model is used when the PROP is DEFAULT. The
1111
* synthesizable model does not implement the cfg and test interface and should
1212
* only be used for basic testing and for synthesizing for FPGA devices.
1313
* Advanced ASIC development should rely on complete functional models
1414
* supplied on a per macro basis.
1515
*
1616
* Technologoy specific implementations of "la_dpram" would generally include
1717
* one ore more hardcoded instantiations of RAM modules with a generate
18-
* statement relying on the "TYPE" to select between the list of modules
18+
* statement relying on the "PROP" to select between the list of modules
1919
* at build time.
2020
*
2121
****************************************************************************/
2222

2323
module la_dpram #(
2424
parameter DW = 32, // Memory width
2525
parameter AW = 10, // address width (derived)
26-
parameter TYPE = "DEFAULT", // pass through variable for hard macro
26+
parameter PROP = "DEFAULT", // pass through variable for hard macro
2727
parameter CTRLW = 128, // width of asic ctrl interface
2828
parameter TESTW = 128 // width of asic test interface
2929
) ( // Write port

lambdalib/ramlib/rtl/la_spram.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
*
88
* This is a wrapper for selecting from a set of hardened memory macros.
99
*
10-
* A synthesizable reference model is used when the TYPE is DEFAULT. The
10+
* A synthesizable reference model is used when the PROP is DEFAULT. The
1111
* synthesizable model does not implement the cfg and test interface and should
1212
* only be used for basic testing and for synthesizing for FPGA devices.
1313
* Advanced ASIC development should rely on complete functional models
1414
* supplied on a per macro basis.
1515
*
1616
* Technologoy specific implementations of "la_spram" would generally include
1717
* one ore more hardcoded instantiations of RAM modules with a generate
18-
* statement relying on the "TYPE" to select between the list of modules
18+
* statement relying on the "PROP" to select between the list of modules
1919
* at build time.
2020
*
2121
****************************************************************************/
2222

2323
module la_spram #(
2424
parameter DW = 32, // Memory width
2525
parameter AW = 10, // Address width (derived)
26-
parameter TYPE = "DEFAULT", // Pass through variable for hard macro
26+
parameter PROP = "DEFAULT", // Pass through variable for hard macro
2727
parameter CTRLW = 1, // Width of asic ctrl interface
2828
parameter TESTW = 1 // Width of asic test interface
2929
) ( // Memory interface

lambdalib/ramlib/rtl/la_spregfile.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
*
88
* This is a wrapper for selecting from a set of hardened register file macros.
99
*
10-
* A synthesizable reference model is used when the TYPE is DEFAULT. The
10+
* A synthesizable reference model is used when the PROP is DEFAULT. The
1111
* synthesizable model does not implement the cfg and test interface and should
1212
* only be used for basic testing and for synthesizing for FPGA devices.
1313
* Advanced ASIC development should rely on complete functional models
1414
* supplied on a per macro basis.
1515
*
1616
* Technologoy specific implementations of "la_spregfile" would generally
1717
* include one ore more hardcoded instantiations of RF modules with a generate
18-
* statement relying on the "TYPE" to select between the list of modules
18+
* statement relying on the "PROP" to select between the list of modules
1919
* at build time.
2020
*
2121
****************************************************************************/
2222

2323
module la_spregfile #(
2424
parameter DW = 32, // Memory width
2525
parameter AW = 10, // Address width (derived)
26-
parameter TYPE = "DEFAULT", // Pass through variable for hard macro
26+
parameter PROP = "DEFAULT", // Pass through variable for hard macro
2727
parameter CTRLW = 128, // Width of asic ctrl interface
2828
parameter TESTW = 128 // Width of asic test interface
2929
) ( // Memory interface
@@ -46,7 +46,7 @@ module la_spregfile #(
4646
la_spram #(
4747
.DW(DW),
4848
.AW(AW),
49-
.TYPE(TYPE),
49+
.PROP(PROP),
5050
.CTRLW(CTRLW),
5151
.TESTW(TESTW)
5252
) memory (

lambdalib/ramlib/rtl/la_syncfifo.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module la_syncfifo
1717
parameter CHAOS = 1, // generates random full logic when set
1818
parameter CTRLW = 1, // width of asic ctrl interface
1919
parameter TESTW = 1, // width of asic test interface
20-
parameter TYPE = "DEFAULT" // Pass through variable for hard macro
20+
parameter PROP = "DEFAULT" // Pass through variable for hard macro
2121
)
2222
(// basic interface
2323
input clk,

lambdalib/syslib/rtl/la_qspi.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Docs:
77
*
8-
* 1. Statically configurable as host/device by TYPE.
8+
* 1. Statically configurable as host/device by PROP.
99
1010
****************************************************************************/
1111
module la_qspi #(

lambdalib/utils/templates/la_spmemory.v

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
*
88
* This is a wrapper for selecting from a set of hardened memory macros.
99
*
10-
* A synthesizable reference model is used when the TYPE is DEFAULT. The
10+
* A synthesizable reference model is used when the PROP is DEFAULT. The
1111
* synthesizable model does not implement the cfg and test interface and should
1212
* only be used for basic testing and for synthesizing for FPGA devices.
1313
* Advanced ASIC development should rely on complete functional models
1414
* supplied on a per macro basis.
1515
*
1616
* Technologoy specific implementations of "la_sp{{ type }}" would generally include
1717
* one ore more hardcoded instantiations of {{ type }} modules with a generate
18-
* statement relying on the "TYPE" to select between the list of modules
18+
* statement relying on the "PROP" to select between the list of modules
1919
* at build time.
2020
*
2121
****************************************************************************/
2222

2323
module la_sp{{ type }}
2424
#(parameter DW = 32, // Memory width
2525
parameter AW = 10, // Address width (derived)
26-
parameter TYPE = "DEFAULT", // Pass through variable for hard macro
26+
parameter PROP = "DEFAULT", // Pass through variable for hard macro
2727
parameter CTRLW = 128, // Width of asic ctrl interface
2828
parameter TESTW = 128 // Width of asic test interface
2929
)
@@ -45,15 +45,15 @@ module la_sp{{ type }}
4545
);
4646

4747
// Determine which memory to select
48-
localparam MEM_TYPE = (TYPE != "DEFAULT") ? TYPE :{% for aw, dw_select in selection_table.items() %}
48+
localparam MEM_PROP = (PROP != "DEFAULT") ? PROP :{% for aw, dw_select in selection_table.items() %}
4949
{% if loop.nextitem is defined %}(AW {% if loop.previtem is defined %}=={% else %}>={% endif %} {{ aw }}) ? {% endif %}{% for dw, memory in dw_select.items() %}{% if loop.nextitem is defined %}(DW >= {{dw}}) ? {% endif %}"{{ memory}}"{% if loop.nextitem is defined %} : {% endif%}{% endfor %}{% if loop.nextitem is defined %} :{% else %};{% endif %}{% endfor %}
5050

5151
localparam MEM_WIDTH = {% for memory, width in width_table %}
52-
(MEM_TYPE == "{{ memory }}") ? {{ width }} :{% endfor %}
52+
(MEM_PROP == "{{ memory }}") ? {{ width }} :{% endfor %}
5353
0;
5454

5555
localparam MEM_DEPTH = {% for memory, depth in depth_table %}
56-
(MEM_TYPE == "{{ memory }}") ? {{ depth }} :{% endfor %}
56+
(MEM_PROP == "{{ memory }}") ? {{ depth }} :{% endfor %}
5757
0;
5858

5959
// Create memories
@@ -106,10 +106,11 @@ module la_sp{{ type }}
106106
assign ce_in = ce && selected;
107107
assign we_in = we && selected;
108108
{% for memory, inst_name in inst_map.items() %}
109-
{% if loop.previtem is defined %}else {% endif %}if (MEM_TYPE == "{{ memory }}")
109+
if (MEM_PROP == "{{ memory }}") begin: i{{ memory }}
110110
{{ inst_name }} memory ({% for port, net in port_mapping[memory] %}
111111
.{{ port }}({{ net }}){% if loop.nextitem is defined %},{% endif %}{% endfor %}
112-
);{% endfor %}
112+
);
113+
end{% endfor %}
113114
end
114115
end
115116
endgenerate

0 commit comments

Comments
 (0)