File: /__w/ctu-can-regression/ctu-can-regression/test/main_tb/agents/functional_coverage_agent/func_cov_can_core.vhd
0: --------------------------------------------------------------------------------
1: --
2: -- CTU CAN FD IP Core
3: -- Copyright (C) 2021-2023 Ondrej Ille
4: -- Copyright (C) 2023- Logic Design Services Ltd.s
5: --
6: -- Permission is hereby granted, free of charge, to any person obtaining a copy
7: -- of this VHDL component and associated documentation files (the "Component"),
8: -- to use, copy, modify, merge, publish, distribute the Component for
9: -- non-commercial purposes. Using the Component for commercial purposes is
10: -- forbidden unless previously agreed with Copyright holder.
11: --
12: -- The above copyright notice and this permission notice shall be included in
13: -- all copies or substantial portions of the Component.
14: --
15: -- THE COMPONENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16: -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17: -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18: -- AUTHORS OR COPYRIGHTHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19: -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20: -- FROM, OUT OF OR IN CONNECTION WITH THE COMPONENT OR THE USE OR OTHER DEALINGS
21: -- IN THE COMPONENT.
22: --
23: -- The CAN protocol is developed by Robert Bosch GmbH and protected by patents.
24: -- Anybody who wants to implement this IP core on silicon has to obtain a CAN
25: -- protocol license from Bosch.
26: --
27: -- -------------------------------------------------------------------------------
28: --
29: -- CTU CAN FD IP Core
30: -- Copyright (C) 2015-2020 MIT License
31: --
32: -- Authors:
33: -- Ondrej Ille <ondrej.ille@gmail.com>
34: -- Martin Jerabek <martin.jerabek01@gmail.com>
35: --
36: -- Project advisors:
37: -- Jiri Novak <jnovak@fel.cvut.cz>
38: -- Pavel Pisa <pisa@cmp.felk.cvut.cz>
39: --
40: -- Department of Measurement (http://meas.fel.cvut.cz/)
41: -- Faculty of Electrical Engineering (http://www.fel.cvut.cz)
42: -- Czech Technical University (http://www.cvut.cz/)
43: --
44: -- Permission is hereby granted, free of charge, to any person obtaining a copy
45: -- of this VHDL component and associated documentation files (the "Component"),
46: -- to deal in the Component without restriction, including without limitation
47: -- the rights to use, copy, modify, merge, publish, distribute, sublicense,
48: -- and/or sell copies of the Component, and to permit persons to whom the
49: -- Component is furnished to do so, subject to the following conditions:
50: --
51: -- The above copyright notice and this permission notice shall be included in
52: -- all copies or substantial portions of the Component.
53: --
54: -- THE COMPONENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55: -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56: -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57: -- AUTHORS OR COPYRIGHTHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58: -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
59: -- FROM, OUT OF OR IN CONNECTION WITH THE COMPONENT OR THE USE OR OTHER DEALINGS
60: -- IN THE COMPONENT.
61: --
62: -- The CAN protocol is developed by Robert Bosch GmbH and protected by patents.
63: -- Anybody who wants to implement this IP core on silicon has to obtain a CAN
64: -- protocol license from Bosch.
65: --
66: --------------------------------------------------------------------------------
67:
68: --------------------------------------------------------------------------------
69: -- @Purpose:
70: -- Functional coverage for CAN Core
71: --
72: --------------------------------------------------------------------------------
73: -- Revision History:
74: -- 27.4.2025 Created file
75: --------------------------------------------------------------------------------
76:
77: Library ctu_can_fd_tb;
78: context ctu_can_fd_tb.ieee_context;
79: context ctu_can_fd_tb.tb_common_context;
80: context ctu_can_fd_tb.rtl_context;
81:
82: use ctu_can_fd_tb.clk_gen_agent_pkg.all;
83: use ctu_can_fd_tb.tb_shared_vars_pkg.all;
84:
85: entity func_cov_can_core is
86: port (
87: -- DUT clock
88: clk : in std_logic
89: );
90: end entity;
91:
92: architecture tb of func_cov_can_core is
93:
94: -----------------------------------------------------------------------------------------------
95: -- Aliases to "can_core" top
96: -----------------------------------------------------------------------------------------------
97:
98: alias tran_ident_type is
99: << signal .tb_top_ctu_can_fd.dut.can_core_inst.tran_ident_type : std_logic >>;
100:
101: alias tran_frame_type is
102: << signal .tb_top_ctu_can_fd.dut.can_core_inst.tran_frame_type : std_logic >>;
103:
104: alias tran_is_rtr is
105: << signal .tb_top_ctu_can_fd.dut.can_core_inst.tran_is_rtr : std_logic >>;
106:
107: alias tran_frame_valid is
108: << signal .tb_top_ctu_can_fd.dut.can_core_inst.tran_frame_valid : std_logic >>;
109:
110: alias rec_ident_type is
111: << signal .tb_top_ctu_can_fd.dut.can_core_inst.rec_ident_type : std_logic >>;
112:
113: alias rec_frame_type is
114: << signal .tb_top_ctu_can_fd.dut.can_core_inst.rec_frame_type : std_logic >>;
115:
116: alias rec_is_rtr is
117: << signal .tb_top_ctu_can_fd.dut.can_core_inst.rec_is_rtr : std_logic >>;
118:
119: alias store_metadata is
120: << signal .tb_top_ctu_can_fd.dut.can_core_inst.store_metadata : std_logic >>;
121:
122: alias tran_valid is
123: << signal .tb_top_ctu_can_fd.dut.can_core_inst.tran_valid : std_logic >>;
124:
125: alias rec_valid is
126: << signal .tb_top_ctu_can_fd.dut.can_core_inst.rec_valid : std_logic >>;
127:
128: -----------------------------------------------------------------------------------------------
129: -- Aliases to "bit_stuffing" and "bit_destuffing"
130: -----------------------------------------------------------------------------------------------
131: alias bds_trigger is
132: << signal .tb_top_ctu_can_fd.dut.can_core_inst.bit_destuffing_inst.bds_trigger : std_logic >>;
133:
134: alias non_fix_to_fix_chng is
135: << signal .tb_top_ctu_can_fd.dut.can_core_inst.bit_destuffing_inst.non_fix_to_fix_chng : std_logic >>;
136:
137: alias stuff_err_q is
138: << signal .tb_top_ctu_can_fd.dut.can_core_inst.bit_destuffing_inst.stuff_err_q : std_logic >>;
139:
140: alias stuff_lvl_reached is
141: << signal .tb_top_ctu_can_fd.dut.can_core_inst.bit_destuffing_inst.stuff_lvl_reached : std_logic >>;
142:
143: alias fixed_stuff is
144: << signal .tb_top_ctu_can_fd.dut.can_core_inst.bit_destuffing_inst.fixed_stuff : std_logic >>;
145:
146:
147: -----------------------------------------------------------------------------------------------
148: -- Aliases to "err_counters"
149: -----------------------------------------------------------------------------------------------
150:
151: alias inc_one is
152: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.err_counters_inst.inc_one : std_logic >>;
153:
154: alias inc_eight is
155: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.err_counters_inst.inc_eight : std_logic >>;
156:
157: alias dec_one is
158: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.err_counters_inst.dec_one : std_logic >>;
159:
160: alias rx_err_ctr_inc is
161: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.err_counters_inst.rx_err_ctr_inc : unsigned(8 downto 0) >>;
162:
163: alias rx_err_ctr_q is
164: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.err_counters_inst.rx_err_ctr_q : unsigned(8 downto 0) >>;
165:
166: alias rx_err_ctr_ce is
167: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.err_counters_inst.rx_err_ctr_ce : std_logic >>;
168:
169: -----------------------------------------------------------------------------------------------
170: -- Aliases to "err_detector"
171: -----------------------------------------------------------------------------------------------
172:
173: alias bit_err is
174: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.err_detector_inst.bit_err : std_logic >>;
175:
176: alias bit_err_arb is
177: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.err_detector_inst.bit_err_arb : std_logic >>;
178:
179: alias stuff_err is
180: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.err_detector_inst.stuff_err : std_logic >>;
181:
182: alias form_err is
183: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.err_detector_inst.form_err : std_logic >>;
184:
185: alias ack_err is
186: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.err_detector_inst.ack_err : std_logic >>;
187:
188: alias crc_err is
189: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.err_detector_inst.crc_err : std_logic >>;
190:
191: alias tran_frame_parity_error is
192: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.err_detector_inst.tran_frame_parity_error : std_logic >>;
193:
194: alias err_capt_err_type_q is
195: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.err_detector_inst.err_capt_err_type_q : std_logic_vector(2 downto 0) >>;
196:
197: -----------------------------------------------------------------------------------------------
198: -- Aliases to "fault_confinement_rules"
199: -----------------------------------------------------------------------------------------------
200:
201: alias primary_err is
202: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.fault_confinement_rules_inst.primary_err : std_logic >>;
203:
204: alias err_ctrs_unchanged is
205: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.fault_confinement_rules_inst.err_ctrs_unchanged : std_logic >>;
206:
207: alias is_receiver is
208: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.fault_confinement_rules_inst.is_receiver : std_logic >>;
209:
210: alias is_transmitter is
211: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.fault_confinement_rules_inst.is_transmitter : std_logic >>;
212:
213: alias act_err_ovr_flag is
214: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.fault_confinement_rules_inst.act_err_ovr_flag : std_logic >>;
215:
216: alias err_detected is
217: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.fault_confinement_rules_inst.err_detected : std_logic >>;
218:
219: alias err_delim_late is
220: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.fault_confinement_rules_inst.err_delim_late : std_logic >>;
221:
222: alias bit_err_after_ack_err is
223: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.fault_confinement_rules_inst.bit_err_after_ack_err : std_logic >>;
224:
225: alias decrement_rec is
226: << signal .tb_top_ctu_can_fd.dut.can_core_inst.fault_confinement_inst.fault_confinement_rules_inst.decrement_rec : std_logic >>;
227:
228:
229: -----------------------------------------------------------------------------------------------
230: -- Aliases to "protocol_control_fsm"
231: -----------------------------------------------------------------------------------------------
232:
233: alias curr_state is
234: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.curr_state : t_protocol_control_state >>;
235:
236: alias next_state is
237: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.next_state : t_protocol_control_state >>;
238:
239: alias err_frm_req is
240: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.err_frm_req : std_logic >>;
241:
242: alias pex_on_fdf_enable is
243: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.pex_on_fdf_enable : std_logic >>;
244:
245: alias pex_on_res_enable is
246: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.pex_on_res_enable : std_logic >>;
247:
248: alias mr_status_pexs is
249: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.mr_status_pexs : std_logic >>;
250:
251: alias pexs_set is
252: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.pexs_set : std_logic >>;
253:
254: alias arbitration_lost_i is
255: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.arbitration_lost_i : std_logic >>;
256:
257: alias mr_settings_pex is
258: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.mr_settings_pex : std_logic >>;
259:
260: alias mr_mode_fde is
261: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.mr_mode_fde : std_logic >>;
262:
263: alias mr_settings_nisofd is
264: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.protocol_control_fsm_inst.mr_settings_nisofd : std_logic >>;
265:
266: -----------------------------------------------------------------------------------------------
267: -- Aliases to "reintegration_counter"
268: -----------------------------------------------------------------------------------------------
269: alias reinteg_ctr_clr is
270: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.reintegration_counter_inst.reinteg_ctr_clr : std_logic >>;
271:
272: alias reinteg_ctr_expired is
273: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.reintegration_counter_inst.reinteg_ctr_expired : std_logic >>;
274:
275: alias reinteg_ctr_enable is
276: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.reintegration_counter_inst.reinteg_ctr_enable : std_logic >>;
277:
278: alias rx_trigger is
279: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.reintegration_counter_inst.rx_trigger : std_logic >>;
280:
281: -----------------------------------------------------------------------------------------------
282: -- Aliases to "rx_shift_reg"
283: -----------------------------------------------------------------------------------------------
284:
285: alias rx_clear is
286: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_clear : std_logic >>;
287:
288: alias rx_shift_in_sel is
289: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_shift_in_sel : std_logic >>;
290:
291: alias rx_shift_ena is
292: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_shift_ena : std_logic_vector(3 downto 0) >>;
293:
294: alias rx_store_base_id is
295: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_store_base_id : std_logic >>;
296:
297: alias rx_store_ext_id is
298: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_store_ext_id : std_logic >>;
299:
300: alias rx_store_ide is
301: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_store_ide : std_logic >>;
302:
303: alias rx_store_rtr is
304: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_store_rtr : std_logic >>;
305:
306: alias rx_store_edl is
307: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_store_edl : std_logic >>;
308:
309: alias rx_store_dlc is
310: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_store_dlc : std_logic >>;
311:
312: alias rx_store_esi is
313: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_store_esi : std_logic >>;
314:
315: alias rx_store_brs is
316: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_store_brs : std_logic >>;
317:
318: alias rx_store_stuff_count is
319: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.rx_shift_reg_inst.rx_store_stuff_count : std_logic >>;
320:
321: -----------------------------------------------------------------------------------------------
322: -- Aliases to "tx_shift_reg"
323: -----------------------------------------------------------------------------------------------
324:
325: alias tx_load_base_id is
326: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.tx_shift_reg_inst.tx_load_base_id : std_logic >>;
327:
328: alias tx_load_ext_id is
329: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.tx_shift_reg_inst.tx_load_ext_id : std_logic >>;
330:
331: alias tx_load_dlc is
332: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.tx_shift_reg_inst.tx_load_dlc : std_logic >>;
333:
334: alias tx_load_data_word is
335: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.tx_shift_reg_inst.tx_load_data_word : std_logic >>;
336:
337: alias tx_load_stuff_count is
338: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.tx_shift_reg_inst.tx_load_stuff_count : std_logic >>;
339:
340: alias tx_load_crc is
341: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.tx_shift_reg_inst.tx_load_crc : std_logic >>;
342:
343: alias tran_frame_test is
344: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.tx_shift_reg_inst.tran_frame_test : t_frame_test_w >>;
345:
346: alias mr_mode_tstm is
347: << signal .tb_top_ctu_can_fd.dut.can_core_inst.protocol_control_inst.tx_shift_reg_inst.mr_mode_tstm : std_logic >>;
348:
349: begin
350:
351: -- psl default clock is rising_edge(clk);
352:
353: -----------------------------------------------------------------------------------------------
354: -- Transmitted and received frame
355: -----------------------------------------------------------------------------------------------
356:
357: -- psl traffic_ctrs_tx_inc_cov : cover
358: -- {tran_valid = '1'};
359:
360: -- psl traffic_ctrs_rx_inc_cov : cover
361: -- {rec_valid = '1'};
362:
363: -----------------------------------------------------------------------------------------------
364: -- Transmitted FDF/IDE/RTR combinations
365: -----------------------------------------------------------------------------------------------
366:
367: -- psl tx_base_id_can_2_0_cov : cover
368: -- {tran_ident_type = BASE and
369: -- tran_frame_type = NORMAL_CAN and
370: -- tran_is_rtr = '0' and
371: -- tran_frame_valid = '1'};
372:
373: -- psl tx_extended_id_can_2_0_cov : cover
374: -- {tran_ident_type = EXTENDED and
375: -- tran_frame_type = NORMAL_CAN and
376: -- tran_is_rtr = '0' and
377: -- tran_frame_valid = '1'};
378:
379: -- psl tx_base_id_can_fd_cov : cover
380: -- {tran_ident_type = BASE and
381: -- tran_frame_type = FD_CAN and
382: -- tran_is_rtr = '0' and
383: -- tran_frame_valid = '1'};
384:
385: -- psl tx_extended_id_can_fd_cov : cover
386: -- {tran_ident_type = EXTENDED and
387: -- tran_frame_type = FD_CAN and
388: -- tran_is_rtr = '0' and
389: -- tran_frame_valid = '1'};
390:
391: -- psl tx_base_id_can_2_0_rtr_cov : cover
392: -- {tran_ident_type = BASE and
393: -- tran_frame_type = NORMAL_CAN and
394: -- tran_is_rtr = '1' and
395: -- tran_frame_valid = '1'};
396:
397: -- psl tx_extended_id_can_2_0_rtr_cov : cover
398: -- {tran_ident_type = EXTENDED and
399: -- tran_frame_type = NORMAL_CAN and
400: -- tran_is_rtr = '1' and
401: -- tran_frame_valid = '1'};
402:
403: -- psl tx_base_id_can_fd_rtr_cov : cover
404: -- {tran_ident_type = BASE and
405: -- tran_frame_type = FD_CAN and
406: -- tran_is_rtr = '1' and
407: -- tran_frame_valid = '1'};
408:
409: -- psl tx_extended_id_can_fd_rtr_cov : cover
410: -- {tran_ident_type = EXTENDED and
411: -- tran_frame_type = FD_CAN and
412: -- tran_is_rtr = '1' and
413: -- tran_frame_valid = '1'};
414:
415:
416: -----------------------------------------------------------------------------------------------
417: -- Received frame FDF/IDE/RTR combinations
418: -----------------------------------------------------------------------------------------------
419:
420: -- psl rx_base_id_can_2_0_cov : cover
421: -- {rec_ident_type = BASE and
422: -- rec_frame_type = NORMAL_CAN and
423: -- rec_is_rtr = '0' and
424: -- store_metadata = '1'};
425:
426: -- psl rx_extended_id_can_2_0_cov : cover
427: -- {rec_ident_type = EXTENDED and
428: -- rec_frame_type = NORMAL_CAN and
429: -- rec_is_rtr = '0' and
430: -- store_metadata = '1'};
431:
432: -- psl rx_base_id_can_fd_cov : cover
433: -- {rec_ident_type = BASE and
434: -- rec_frame_type = FD_CAN and
435: -- rec_is_rtr = '0' and
436: -- store_metadata = '1'};
437:
438: -- psl rx_extended_id_can_fd_cov : cover
439: -- {rec_ident_type = EXTENDED and
440: -- rec_frame_type = FD_CAN and
441: -- rec_is_rtr = '0' and
442: -- store_metadata = '1'};
443:
444: -- psl rx_base_id_can_2_0_rtr_cov : cover
445: -- {rec_ident_type = BASE and
446: -- rec_frame_type = NORMAL_CAN and
447: -- rec_is_rtr = '1' and
448: -- store_metadata = '1'};
449:
450: -- psl rx_extended_id_can_2_0_rtr_cov : cover
451: -- {rec_ident_type = EXTENDED and
452: -- rec_frame_type = NORMAL_CAN and
453: -- rec_is_rtr = '1' and
454: -- store_metadata = '1'};
455:
456: -----------------------------------------------------------------------------------------------
457: -- Bit stuffing and destuffing
458: -----------------------------------------------------------------------------------------------
459:
460: -- psl bds_non_fix_to_fixed_change_cov : cover
461: -- {bds_trigger = '1' and non_fix_to_fix_chng = '1'};
462:
463: -- psl bds_stuff_err_detect_cov : cover
464: -- {stuff_err_q = '1'};
465:
466: -- psl bds_stuff_lvl_reached_regular_cov : cover
467: -- {stuff_lvl_reached = '1' and fixed_stuff = '0'};
468:
469: -- psl bds_stuff_lvl_reached_fixed_cov : cover
470: -- {stuff_lvl_reached = '1' and fixed_stuff = '1'};
471:
472:
473: -----------------------------------------------------------------------------------------------
474: -- Error counters
475: -----------------------------------------------------------------------------------------------
476:
477: -- psl err_ctrs_inc_one_cov : cover
478: -- {inc_one = '1'};
479:
480: -- psl err_ctrs_inc_eight_cov : cover
481: -- {inc_eight = '1'};
482:
483: -- psl err_ctrs_dec_one_cov : cover
484: -- {dec_one = '1'};
485:
486: -- psl err_ctrs_rec_saturation : cover
487: -- {(rx_err_ctr_inc < rx_err_ctr_q) and rx_err_ctr_ce = '1'};
488:
489:
490: -----------------------------------------------------------------------------------------------
491: -- Error detector
492: -----------------------------------------------------------------------------------------------
493:
494: -- Types of error being signalled
495:
496: -- psl err_detect_bit_err_cov : cover
497: -- {bit_err = '1'};
498:
499: -- psl err_detect_bit_err_arb_cov : cover
500: -- {bit_err_arb = '1'};
501:
502: -- psl err_detect_stuff_err_cov : cover
503: -- {stuff_err = '1'};
504:
505: -- psl err_detect_form_err_cov : cover
506: -- {form_err = '1'};
507:
508: -- psl err_detect_ack_err_cov : cover
509: -- {ack_err = '1'};
510:
511: -- psl err_detect_crc_err_cov : cover
512: -- {crc_err = '1'};
513:
514: -- psl err_detect_parity_err_cov : cover
515: -- {tran_frame_parity_error = '1'};
516:
517: -- Types of error being captured
518:
519: -- psl err_capt_q_form_err_cov : cover
520: -- {err_capt_err_type_q = ERC_FRM_ERR};
521:
522: -- psl err_capt_q_bit_err_cov : cover
523: -- {err_capt_err_type_q = ERC_BIT_ERR};
524:
525: -- psl err_capt_q_crc_err_cov : cover
526: -- {err_capt_err_type_q = ERC_CRC_ERR};
527:
528: -- psl err_capt_q_ack_err_cov : cover
529: -- {err_capt_err_type_q = ERC_ACK_ERR};
530:
531: -- psl err_capt_q_stuff_err_cov : cover
532: -- {err_capt_err_type_q = ERC_STUF_ERR};
533:
534: -- psl err_capt_q_prt_err_cov : cover
535: -- {err_capt_err_type_q = ERC_PRT_ERR};
536:
537:
538: -----------------------------------------------------------------------------------------------
539: -- Fault confinement rules
540: -----------------------------------------------------------------------------------------------
541:
542: -- psl err_ctr_inc_eight_A : cover
543: -- {primary_err = '1' and is_receiver = '1'};
544:
545: -- psl err_ctr_inc_eight_B : cover
546: -- {(act_err_ovr_flag = '1' and err_detected = '1') and
547: -- (not(primary_err = '1' and is_receiver = '1'))};
548:
549: -- psl err_ctr_inc_eight_C : cover
550: -- {(is_transmitter = '1' and err_detected = '1' and err_ctrs_unchanged = '0') and
551: -- (not(act_err_ovr_flag = '1' and err_detected = '1')) and
552: -- (not(primary_err = '1' and is_receiver = '1'))};
553:
554: -- psl err_ctr_inc_eight_D : cover
555: -- { (err_delim_late = '1' or bit_err_after_ack_err = '1') and
556: -- (not(is_transmitter = '1' and err_detected = '1' and err_ctrs_unchanged = '0')) and
557: -- (not(act_err_ovr_flag = '1' and err_detected = '1')) and
558: -- (not(primary_err = '1' and is_receiver = '1'))};
559:
560: -- psl err_ctr_dec_one_A : cover
561: -- {decrement_rec = '1' and tran_valid = '0'};
562:
563: -- psl err_ctr_dec_one_B : cover
564: -- {decrement_rec = '0' and tran_valid = '1'};
565:
566:
567: -----------------------------------------------------------------------------------------------
568: -- Protocol control
569: -----------------------------------------------------------------------------------------------
570:
571: -- Error frame request in various parts of CAN frame!
572:
573: -- Note: SOF must be actually previous cycle, since at time when error
574: -- frame request arrives, it is already next state!
575: --
576: -- psl err_frm_req_in_sof_cov : cover
577: -- {curr_state = s_pc_sof; err_frm_req = '1'};
578:
579: -- psl err_frm_req_in_s_pc_base_id_in_base_cov : cover
580: -- {curr_state = s_pc_base_id and err_frm_req = '1'};
581:
582: -- psl err_frm_req_in_s_pc_ext_id_in_ext_id_cov : cover
583: -- {curr_state = s_pc_ext_id and err_frm_req = '1'};
584:
585: -- psl err_frm_req_in_s_pc_ext_id_in_rtr_srr_r1_cov : cover
586: -- {curr_state = s_pc_rtr_srr_r1 and err_frm_req = '1'};
587:
588: -- psl err_frm_req_in_s_pc_ext_id_in_ide_cov : cover
589: -- {curr_state = s_pc_ide and err_frm_req = '1'};
590:
591: -- psl err_frm_req_in_s_pc_rtr_r1_cov : cover
592: -- {curr_state = s_pc_rtr_r1 and err_frm_req = '1'};
593:
594: -- psl err_frm_req_in_s_pc_edl_r1_cov : cover
595: -- {curr_state = s_pc_edl_r1 and err_frm_req = '1'};
596:
597: -- psl err_frm_req_in_s_pc_r0_ext_cov : cover
598: -- {curr_state = s_pc_r0_ext and err_frm_req = '1'};
599:
600: -- psl err_frm_req_in_s_pc_r0_fd_cov : cover
601: -- {curr_state = s_pc_r0_fd and err_frm_req = '1'};
602:
603: -- psl err_frm_req_in_s_pc_edl_r0_cov : cover
604: -- {curr_state = s_pc_edl_r0 and err_frm_req = '1'};
605:
606: -- psl err_frm_req_in_s_pc_esi_cov : cover
607: -- {curr_state = s_pc_esi and err_frm_req = '1'};
608:
609: -- psl err_frm_req_in_s_pc_dlc_cov : cover
610: -- {curr_state = s_pc_dlc and err_frm_req = '1'};
611:
612: -- psl err_frm_req_in_s_pc_data_cov : cover
613: -- {curr_state = s_pc_data and err_frm_req = '1'};
614:
615: -- psl err_frm_req_in_s_pc_stuff_count_cov : cover
616: -- {curr_state = s_pc_stuff_count and err_frm_req = '1'};
617:
618: -- psl err_frm_req_in_s_pc_crc_cov : cover
619: -- {curr_state = s_pc_crc and err_frm_req = '1'};
620:
621: -- psl err_frm_req_in_s_pc_crc_delim_cov : cover
622: -- {curr_state = s_pc_crc_delim and err_frm_req = '1'};
623:
624: -- psl err_frm_req_in_s_pc_ack_cov : cover
625: -- {curr_state = s_pc_ack and err_frm_req = '1'};
626:
627: -- psl err_frm_req_in_s_pc_eof_cov : cover
628: -- {curr_state = s_pc_eof and err_frm_req = '1'};
629:
630: -- psl err_frm_req_in_s_pc_act_err_flag_cov : cover
631: -- {curr_state = s_pc_act_err_flag and err_frm_req = '1'};
632:
633: -- psl err_frm_req_in_s_pc_ovr_flag_cov : cover
634: -- {curr_state = s_pc_ovr_flag and err_frm_req = '1'};
635:
636: -- psl err_frm_req_in_s_pc_ovr_delim_cov : cover
637: -- {curr_state = s_pc_ovr_delim and err_frm_req = '1'};
638:
639: -- psl err_frm_req_in_s_pc_err_delim_cov : cover
640: -- {curr_state = s_pc_err_delim and err_frm_req = '1'};
641:
642:
643: -- Overload frame requests
644:
645: -- psl ovr_from_eof_cov : cover
646: -- {curr_state = s_pc_eof and next_state = s_pc_ovr_flag};
647:
648: -- psl ovr_from_intermission_cov : cover
649: -- {curr_state = s_pc_intermission and next_state = s_pc_ovr_flag};
650:
651: -- psl ovr_from_err_delim : cover
652: -- {curr_state = s_pc_err_delim and next_state = s_pc_ovr_flag};
653:
654: -- psl ovr_from_ovr_delim_cov : cover
655: -- {curr_state = s_pc_ovr_delim and next_state = s_pc_ovr_flag};
656:
657:
658: -- Protocol exception
659:
660: -- psl pex_on_fdf_enable_cov : cover
661: -- {pex_on_fdf_enable = '1' and mr_status_pexs = '1'};
662:
663: -- psl pex_on_res_enable_cov : cover
664: -- {pex_on_res_enable = '1' and mr_status_pexs = '1'};
665:
666: -- psl pex_in_s_pc_r0_fd_cov : cover
667: -- {curr_state = s_pc_r0_fd and pexs_set = '1'};
668:
669: -- psl pex_in_s_pc_edl_r1_cov : cover
670: -- {curr_state = s_pc_edl_r1 and pexs_set = '1'};
671:
672: -- CAN frame being transmitted / received with various DUT compliance configurations.
673:
674: -- psl classical_can_cov : cover
675: -- {curr_state = s_pc_base_id and mr_settings_pex = '0' and mr_mode_fde = '0'};
676:
677: -- psl fd_tolerant_can_cov : cover
678: -- {curr_state = s_pc_base_id and mr_settings_pex = '1' and mr_mode_fde = '0'};
679:
680: -- psl fd_enabled_can_cov : cover
681: -- {curr_state = s_pc_base_id and mr_settings_pex = '0' and mr_mode_fde = '1'};
682:
683: -- psl fd_enabled_with_pex : cover
684: -- {curr_state = s_pc_base_id and mr_settings_pex = '1' and mr_mode_fde = '1'};
685:
686: -- ISO and Non-ISO variants of the protocol
687:
688: -- psl iso_fd_cov : cover
689: -- {curr_state = s_pc_base_id and mr_settings_nisofd = '0'};
690:
691: -- psl non_iso_fd_cov : cover
692: -- {curr_state = s_pc_base_id and mr_settings_nisofd = '1'};
693:
694: -- Arbitration lost
695:
696: -- psl arb_lost_base_id_cov : cover
697: -- {curr_state = s_pc_base_id and arbitration_lost_i = '1'};
698:
699: -- psl arb_lost_rtr_srr_r1_cov : cover
700: -- {curr_state = s_pc_rtr_srr_r1 and arbitration_lost_i = '1'};
701:
702: -- psl arb_lost_ide_cov : cover
703: -- {curr_state = s_pc_ide and arbitration_lost_i = '1'};
704:
705: -- psl arb_lost_ext_id_cov : cover
706: -- {curr_state = s_pc_ext_id and arbitration_lost_i = '1'};
707:
708: -- psl arb_lost_rtr_r1_cov : cover
709: -- {curr_state = s_pc_rtr_r1 and arbitration_lost_i = '1'};
710:
711:
712: -----------------------------------------------------------------------------------------------
713: -- Reintegration counter
714: -----------------------------------------------------------------------------------------------
715:
716: -- psl reinteg_ctr_clr_cov : cover
717: -- {reinteg_ctr_clr = '1'};
718:
719: -- psl reinteg_ctr_expired_cov : cover
720: -- {reinteg_ctr_expired = '1'};
721:
722: -- psl reinteg_ctr_ce_A : cover
723: -- {(reinteg_ctr_clr = '1') and (not(reinteg_ctr_enable = '1' and rx_trigger = '1'))};
724:
725: -- psl reinteg_ctr_ce_B : cover
726: -- {(not(reinteg_ctr_clr = '1')) and (reinteg_ctr_enable = '1' and rx_trigger = '1')};
727:
728:
729: -----------------------------------------------------------------------------------------------
730: -- RX Shift register
731: -----------------------------------------------------------------------------------------------
732:
733: -- psl rx_shift_reg_clear_cov : cover
734: -- {rx_clear = '1'};
735:
736: -- In linear mode, all bytes are shifting at once!
737: -- psl rx_shift_reg_linear_mode_cov : cover
738: -- {rx_shift_in_sel = '0' and rx_shift_ena = "1111"};
739:
740: -- psl rx_shift_reg_byte_mode_byte_1_cov : cover
741: -- {rx_shift_in_sel = '1' and rx_shift_ena = "0001"};
742:
743: -- psl rx_shift_reg_byte_mode_byte_2_cov : cover
744: -- {rx_shift_in_sel = '1' and rx_shift_ena = "0010"};
745:
746: -- psl rx_shift_reg_byte_mode_byte_3_cov : cover
747: -- {rx_shift_in_sel = '1' and rx_shift_ena = "0100"};
748:
749: -- psl rx_shift_reg_byte_mode_byte_4_cov : cover
750: -- {rx_shift_in_sel = '1' and rx_shift_ena = "1000"};
751:
752: -- psl rx_shift_reg_store_base_id_cov : cover
753: -- {rx_store_base_id = '1'};
754:
755: -- psl rx_shift_reg_store_ext_id_cov : cover
756: -- {rx_store_ext_id = '1'};
757:
758: -- psl rx_shift_reg_store_ide_cov : cover
759: -- {rx_store_ide = '1'};
760:
761: -- psl rx_shift_reg_store_rtr_cov : cover
762: -- {rx_store_rtr = '1'};
763:
764: -- psl rx_shift_reg_store_edl_cov : cover
765: -- {rx_store_edl = '1'};
766:
767: -- psl rx_shift_reg_store_dlc_cov : cover
768: -- {rx_store_dlc = '1'};
769:
770: -- psl rx_shift_reg_store_esi_cov : cover
771: -- {rx_store_esi = '1'};
772:
773: -- psl rx_shift_reg_store_brs_cov : cover
774: -- {rx_store_brs = '1'};
775:
776: -- psl rx_shift_reg_store_stuff_count_cov : cover
777: -- {rx_store_stuff_count = '1'};
778:
779:
780: -----------------------------------------------------------------------------------------------
781: -- TX Shift register
782: -----------------------------------------------------------------------------------------------
783:
784: -- psl tx_shift_reg_load_base_id_cov : cover
785: -- {tx_load_base_id = '1'};
786:
787: -- psl tx_shift_reg_load_extended_id_cov : cover
788: -- {tx_load_ext_id = '1'};
789:
790: -- psl tx_shift_reg_load_dlc_cov : cover
791: -- {tx_load_dlc = '1'};
792:
793: -- psl tx_shift_reg_load_data_word_cov : cover
794: -- {tx_load_data_word = '1'};
795:
796: -- psl tx_shift_reg_load_stuff_count_cov : cover
797: -- {tx_load_stuff_count = '1'};
798:
799: -- psl tx_shift_reg_load_crc_cov : cover
800: -- {tx_load_crc = '1'};
801:
802: -- psl tx_shift_flip_fstc_cov : cover
803: -- {tran_frame_test.fstc = '1' and mr_mode_tstm = '1'};
804:
805: -- psl tx_shift_flip_fcrc_cov : cover
806: -- {tran_frame_test.fcrc = '1' and mr_mode_tstm = '1'};
807:
808: -- psl tx_shift_flip_sdlc_cov : cover
809: -- {tran_frame_test.sdlc = '1' and mr_mode_tstm = '1'};
810:
811: -- psl tx_shift_flip_fstc_disable_cov : cover
812: -- {tran_frame_test.fstc = '1' and mr_mode_tstm = '0'};
813:
814: -- psl tx_shift_flip_fcrc_disable_cov : cover
815: -- {tran_frame_test.fcrc = '1' and mr_mode_tstm = '0'};
816:
817: -- psl tx_shift_flip_sdlc_disable_cov : cover
818: -- {tran_frame_test.sdlc = '1' and mr_mode_tstm = '0'};
819:
820:
821: end architecture;