Skip to content

Commit b541494

Browse files
committed
Name changes for clarity
-PLL is something you instantiate O(1) times and clarity is a LOT more important than brevity. This new scheme should be final.
1 parent fda70ca commit b541494

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

lambdalib/analoglib/la_pll/rtl/la_pll.v

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,45 +16,46 @@
1616
* a problem in real designs.
1717
*
1818
*************************************************************************/
19-
module la_pll #(parameter PROP = "", // cell property
20-
parameter NIN = 1, // number of input reference clocks
21-
parameter NOUT = 1, // number of output clocks
22-
parameter REFW = 8, // reference divider width
23-
parameter FBW = 8, // feedback divider width
24-
parameter PW = 8, // post feedback divider/phase width
25-
parameter CW = 1, // control vector width
26-
parameter SW = 1 // status vector width
19+
module la_pll #(parameter PROP = "", // cell property
20+
parameter NIN = 1, // number of input reference clocks
21+
parameter NOUT = 1, // number of output clocks
22+
parameter DIVINW = 8, // reference divider width
23+
parameter DIVFBW = 8, // feedback divider width
24+
parameter DIVPOSTW = 8, // post feedback divider width
25+
parameter PHASEW = 8, // phase shift adjust width
26+
parameter CW = 1, // control vector width
27+
parameter SW = 1 // status vector width
2728
)
2829
(
2930
// supplies
30-
inout vdda, // analog supply
31-
inout vdd, // digital core supply
32-
inout vddaux, // aux core supply
33-
inout vss, // common ground
31+
inout vdda, // analog supply
32+
inout vdd, // digital core supply
33+
inout vddaux, // aux core supply
34+
inout vss, // common ground
3435
// clocks
35-
input [NIN-1:0] refclk, // input reference clock
36-
output [NOUT-1:0] clkout, // output clocks
36+
input [NIN-1:0] clkin, // input reference clock
37+
output [NOUT-1:0] clkout, // output clocks
3738
// standard controls
38-
input reset, // active high async reset
39-
input en, // pll enable
40-
input bypass, // pll bypasses
41-
input [NIN-1:0] clksel, // one hot clock selector
42-
input [REFW-1:0] divref, // reference divider
43-
input [FBW-1:0] divfb, // feedback divider
44-
input [NOUT*PW-1:0] divpost, // output divider
45-
input [NOUT*PW-1:0] phase, // output phase shift
46-
output locked, // pll is locked
39+
input reset, // active high async reset
40+
input en, // pll enable
41+
input bypass, // pll bypasses
42+
input [NIN-1:0] clksel, // one hot clock selector
43+
input [DIVINW-1:0] divin, // reference divider
44+
input [DIVFBW-1:0] divfb, // feedback divider
45+
input [NOUT*DIVPOSTW-1:0] divpost, // output divider
46+
input [NOUT*PHASEW-1:0] phase, // output phase shift
47+
output locked, // pll is locked
4748
// user defined signals (defined per unique PLL)
48-
input [CW-1:0] ctrl, // controls
49-
output [SW-1:0] status // status
49+
input [CW-1:0] ctrl, // controls
50+
output [SW-1:0] status // status
5051
);
5152

5253
genvar i;
5354

5455
wire clk;
5556

5657
// input clock selector
57-
assign clk = |(refclk[NIN-1:0] & clksel[NIN-1:0]);
58+
assign clk = |(clkin[NIN-1:0] & clksel[NIN-1:0]);
5859

5960
// model bypass and pll en
6061
for (i = 0; i < NOUT; i = i + 1) begin : gen_out

0 commit comments

Comments
 (0)