Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[clkmgr] Update to support feedthrough clocks
- useful for modules using always on clock

Signed-off-by: Timothy Chen <timothytim@google.com>
  • Loading branch information
Timothy Chen committed Jul 7, 2020
1 parent 457b94a commit 00cad63
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions hw/ip/clkmgr/data/clkmgr.sv.tpl
Expand Up @@ -64,12 +64,19 @@ module clkmgr import clkmgr_pkg::*; (


////////////////////////////////////////////////////
// Root gating
// Feed through clocks
// Feed through clocks do not actually need to be in clkmgr, as they are
// completely untouched. The only reason they are here is for easier
// bundling management purposes through clocks_o
////////////////////////////////////////////////////
% for k,v in ft_clks.items():
assign clocks_o.${k} = clk_${v}_i;
% endfor

// the rst_ni connection below is incorrect, need to find a proper reset in the sequence to use
// if the clkmgr is always on, can use por synced directly
// if not, then need to generate something ahead of lc/sys

////////////////////////////////////////////////////
// Root gating
////////////////////////////////////////////////////

logic async_roots_en;
logic roots_en_q2, roots_en_q1, roots_en_d;
Expand Down Expand Up @@ -137,9 +144,6 @@ module clkmgr import clkmgr_pkg::*; (
// Software direct control group
////////////////////////////////////////////////////

// the rst_ni connection below is incorrect, need to find a proper reset in the sequence to use
// if the clkmgr is always on, can use por synced directly
// if not, then need to generate something ahead of lc/sys
% for k in sw_clks:
logic ${k}_sw_en;
% endfor
Expand Down Expand Up @@ -169,10 +173,6 @@ module clkmgr import clkmgr_pkg::*; (
// clock target
////////////////////////////////////////////////////

// the rst_ni connection below is incorrect, need to find a proper reset in the sequence to use
// if the clkmgr is always on, can use por synced directly
// if not, then need to generate something ahead of lc/sys

% for k in hint_clks:
logic ${k}_hint;
logic ${k}_en;
Expand Down
2 changes: 1 addition & 1 deletion hw/ip/clkmgr/data/clkmgr_pkg.sv.tpl
Expand Up @@ -15,7 +15,7 @@ package clkmgr_pkg;
};
typedef struct packed {
% for clk in {**hint_clks, **rg_clks, **sw_clks}:
% for clk in {**ft_clks, **hint_clks, **rg_clks, **sw_clks}:
logic ${clk};
% endfor
Expand Down

0 comments on commit 00cad63

Please sign in to comment.