Skip to content

Commit 9c407a6

Browse files
author
Eran Meisner
committed
[ast] split ast os to power domains
1 parent 1390d64 commit 9c407a6

31 files changed

+1772
-1091
lines changed

hw/top_earlgrey/dv/env/ast_ext_clk_if.sv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ interface ast_ext_clk_if ();
1515
// This task returns once the external clock has gone through an active cycle.
1616
// Notice it will fail if the active cycle has already started.
1717
task automatic span_external_clock_active_window();
18-
`DV_WAIT(u_ast.u_ast_clks_byp.u_io_clk_byp_en.out_o == 1'b1,
18+
`DV_WAIT(u_ast.u_ast_main.u_ast_clks_byp_main.u_io_clk_byp_en.out_o == 1'b1,
1919
"Took too long to enable external clock", WaitForExctClkSelChangeInNs,
2020
"ast_ext_clk_if")
2121
`uvm_info("ast_ext_clk_if", "External clk became active for io clk", UVM_MEDIUM)
22-
`DV_WAIT(u_ast.u_ast_clks_byp.u_io_clk_byp_en.out_o == 1'b0,
22+
`DV_WAIT(u_ast.u_ast_main.u_ast_clks_byp_main.u_io_clk_byp_en.out_o == 1'b0,
2323
"Took too long to disable external clock", WaitForExctClkSelChangeInNs,
2424
"ast_ext_clk_if")
2525
`uvm_info("ast_ext_clk_if", "External clk back to inactive for io clk", UVM_MEDIUM)
2626
endtask
2727

2828
// Returns 1 if the external clock is in use.
2929
function automatic logic is_ext_clk_in_use();
30-
return u_ast.u_ast_clks_byp.u_io_clk_byp_en.out_o;
30+
return u_ast.u_ast_main.u_ast_clks_byp_main.u_io_clk_byp_en.out_o;
3131
endfunction
3232

3333
endinterface : ast_ext_clk_if

hw/top_earlgrey/dv/env/ast_supply_if.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface ast_supply_if (
3636
localparam int MioInSysrstCtrlAonKey0In = 46;
3737

3838
function static void force_vcaon_pok(bit value);
39-
force u_ast.u_rglts_pdm_3p3v.vcaon_pok_h_o = value;
39+
force u_ast.u_ast_aon.u_rglts_pdm_3p3v.vcaon_pok_h_o = value;
4040
endfunction
4141

4242
// Create glitch in vcaon_pok_h_o some cycles after this is invoked. Hold vcaon_pok_h_o low for

hw/top_earlgrey/dv/env/chip_if.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ interface chip_if;
4040
`define AES_CONTROL_HIER `AES_HIER.u_aes_core.u_aes_control
4141
`define ALERT_HANDLER_HIER `TOP_HIER.u_alert_handler
4242
`define AON_TIMER_HIER `TOP_HIER.u_aon_timer_aon
43-
`define AST_HIER u_ast
43+
`define AST_HIER u_ast.u_ast_aon
4444
`define CLKMGR_HIER `TOP_HIER.u_clkmgr_aon
4545
`define CPU_HIER `TOP_HIER.u_rv_core_ibex
4646
`define CPU_CORE_HIER `CPU_HIER.u_core

hw/top_earlgrey/dv/env/seq_lib/chip_sw_adc_ctrl_sleep_debug_cable_wakeup_vseq.sv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ class chip_sw_adc_ctrl_sleep_debug_cable_wakeup_vseq extends chip_sw_base_vseq;
77

88
`uvm_object_new
99

10-
localparam string ADC_CHANNEL_OUT_HDL_PATH = "tb.dut.u_ast.adc_d_o[9:0]";
11-
localparam string ADC_DATA_VALID = "tb.dut.u_ast.adc_d_val_o";
12-
localparam string ADC_POWERDOWN = "tb.dut.u_ast.adc_pd_i";
10+
localparam string ADC_CHANNEL_OUT_HDL_PATH = "tb.dut.u_ast.u_ast_aon.adc_d_o[9:0]";
11+
localparam string ADC_DATA_VALID = "tb.dut.u_ast.u_ast_aon.adc_d_val_o";
12+
localparam string ADC_POWERDOWN = "tb.dut.u_ast.u_ast_aon.adc_pd_i";
1313

1414
localparam string ADC_CTRL_WAKEUP_REQ = "tb.dut.top_earlgrey.u_pwrmgr_aon.wakeups_i[1]";
1515

hw/top_earlgrey/dv/env/seq_lib/chip_sw_ast_clk_rst_inputs_vseq.sv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ class chip_sw_ast_clk_rst_inputs_vseq extends chip_sw_base_vseq;
77

88
`uvm_object_new
99

10-
localparam string ADC_CHANNEL_OUT_HDL_PATH = "tb.dut.u_ast.adc_d_o[9:0]";
11-
localparam string ADC_CHANNEL_IN_SEL_HDL_PATH = "tb.dut.u_ast.adc_chnsel_i[1:0]";
10+
localparam string ADC_CHANNEL_OUT_HDL_PATH = "tb.dut.u_ast.u_ast_aon.adc_d_o[9:0]";
11+
localparam string ADC_CHANNEL_IN_SEL_HDL_PATH = "tb.dut.u_ast.u_ast_aon.adc_chnsel_i[1:0]";
1212

13-
localparam string ADC_DATA_VALID = "tb.dut.u_ast.adc_d_val_o";
14-
localparam string ADC_POWERDOWN = "tb.dut.u_ast.adc_pd_i";
13+
localparam string ADC_DATA_VALID = "tb.dut.u_ast.u_ast_aon.adc_d_val_o";
14+
localparam string ADC_POWERDOWN = "tb.dut.u_ast.u_ast_aon.adc_pd_i";
1515
localparam string ADC_CTRL_WAKEUP_REQ = "tb.dut.top_earlgrey.u_pwrmgr_aon.wakeups_i[1]";
1616
localparam uint NUM_ADC_CHANNELS = 2;
1717
localparam uint NUM_LOW_POWER_SAMPLES = 3;

hw/top_earlgrey/dv/env/seq_lib/chip_sw_pwrmgr_deep_sleep_all_wake_ups_vseq.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ class chip_sw_pwrmgr_deep_sleep_all_wake_ups_vseq extends chip_sw_base_vseq;
66
`uvm_object_utils(chip_sw_pwrmgr_deep_sleep_all_wake_ups_vseq)
77
`uvm_object_new
88

9-
localparam string ADC_CHANNEL_OUT_HDL_PATH = "tb.dut.u_ast.adc_d_o[9:0]";
10-
localparam string ADC_CHANNEL_IN_SEL_HDL_PATH = "tb.dut.u_ast.adc_chnsel_i[1:0]";
9+
localparam string ADC_CHANNEL_OUT_HDL_PATH = "tb.dut.u_ast.u_ast_aon.adc_d_o[9:0]";
10+
localparam string ADC_CHANNEL_IN_SEL_HDL_PATH = "tb.dut.u_ast.u_ast_aon.adc_chnsel_i[1:0]";
1111

1212
event adc_valid_rising_edge_event;
1313
event adc_channel1_event;

hw/top_earlgrey/ip/ast/ast.core

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ CAPI=2:
22
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
5-
name: "lowrisc:systems:top_earlgrey_ast:0.1"
5+
name: "lowrisc:systems:ast:0.1"
66
description: "Analog Sensor Top generic views"
7-
87
filesets:
98
files_rtl:
109
depend:
1110
- lowrisc:ip:tlul
12-
- lowrisc:prim:all
11+
- lowrisc:prim_generic:all
1312
- lowrisc:prim:clock_buf
1413
- lowrisc:prim:clock_div
1514
- lowrisc:prim:clock_gating
@@ -18,20 +17,23 @@ filesets:
1817
- lowrisc:prim:lfsr
1918
- lowrisc:earlgrey_ip:pinmux_pkg
2019
- lowrisc:prim:assert
20+
- lowrisc:prim:prim_pkg
2121
- lowrisc:prim:mubi
2222
- lowrisc:prim:multibit_sync
23-
- lowrisc:prim:multibit_sync
2423
- lowrisc:ip:lc_ctrl_pkg
2524
- lowrisc:ip:edn_pkg
2625
- lowrisc:earlgrey_ip:alert_handler_pkg
2726
- lowrisc:earlgrey_ip:clkmgr_pkg
2827
- lowrisc:earlgrey_ip:rstmgr_pkg
2928
- lowrisc:systems:top_earlgrey_ast_pkg
30-
- lowrisc:prim:prim_pkg
3129
files:
3230
- rtl/ast_reg_pkg.sv
31+
- rtl/ast_pkg.sv
3332
- rtl/ast_bhv_pkg.sv
33+
- rtl/ast_aon_main_pkg.sv
3434
- rtl/ast.sv
35+
- rtl/ast_aon.sv
36+
- rtl/ast_main.sv
3537
- rtl/ast_reg_top.sv
3638
- rtl/adc.sv
3739
- rtl/adc_ana.sv
@@ -49,7 +51,8 @@ filesets:
4951
- rtl/usb_clk.sv
5052
- rtl/usb_osc.sv
5153
- rtl/gfr_clk_mux2.sv
52-
- rtl/ast_clks_byp.sv
54+
- rtl/ast_clks_byp_aon.sv
55+
- rtl/ast_clks_byp_main.sv
5356
- rtl/rglts_pdm_3p3v.sv
5457
- rtl/ast_pulse_sync.sv
5558
- rtl/ast_entropy.sv
@@ -127,5 +130,5 @@ targets:
127130
- files_rtl
128131
tools:
129132
vcs:
130-
vcs_options: [-sverilog -ntb_opts uvm-1.2 -CFLAGS --std=c99 -CFLAGS -fno-extended-identifiers -CFLAGS --std=c++17 -timescale=1ns/1ps -l vcs.log]
133+
vcs_options: [-sverilog -ntb_opts uvm-1.2 -CFLAGS --std=c99 -CFLAGS -fno-extended-identifiers -CFLAGS --std=c++11 -timescale=1ns/1ps -l vcs.log]
131134
toplevel: ast

hw/top_earlgrey/ip/ast/ast_pkg.core

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ CAPI=2:
22
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
5-
name: "lowrisc:systems:top_earlgrey_ast_pkg"
5+
name: "lowrisc:systems:ast_pkg"
66
description: "Analog sensor top (AST) wrapper package"
7-
virtual:
8-
- lowrisc:systems:ast_pkg
97

108
filesets:
119
files_rtl:
1210
depend:
13-
- lowrisc:earlgrey_constants:top_pkg
11+
- lowrisc:constants:top_pkg
1412
- lowrisc:ip:lc_ctrl_pkg
1513
files:
1614
- rtl/ast_pkg.sv

hw/top_earlgrey/ip/ast/rtl/adc.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module adc #(
1717
) (
1818
input ast_pkg::awire_t adc_a0_ai, // ADC A0 Analog Input
1919
input ast_pkg::awire_t adc_a1_ai, // ADC A1 Analog Input
20-
input [AdcChannels-1:0] adc_chnsel_i, // Onehot value only for selection
20+
input [AdcChannels-1:0] adc_chnsel_i, // Onehot value only for selrction
2121
input adc_pd_i, // ADC Power Down
2222
input clk_adc_i, // ADC Clock (aon_clk - 200KHz)
2323
input rst_adc_ni, // ADC Reset active low
@@ -54,7 +54,7 @@ always_ff @( posedge clk_adc_i, negedge rst_adc_ni ) begin
5454
end
5555
end
5656

57-
// New Conversion
57+
// New Convertion
5858
assign new_convert = chn_selected && !chn_selected_d && !adc_busy;
5959

6060
////////////////////////////////////////

0 commit comments

Comments
 (0)