-
Notifications
You must be signed in to change notification settings - Fork 100
/
axil2apb.v
717 lines (648 loc) · 16.8 KB
/
axil2apb.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
////////////////////////////////////////////////////////////////////////////////
//
// Filename: axil2apb.v
// {{{
// Project: WB2AXIPSP: bus bridges and other odds and ends
//
// Purpose: High throughput AXI-lite bridge to APB. With both skid
// buffers enabled, it can handle 50% throughput--the maximum
// that APB can handle.
//
// Creator: Dan Gisselquist, Ph.D.
// Gisselquist Technology, LLC
//
////////////////////////////////////////////////////////////////////////////////
// }}}
// Copyright (C) 2020-2024, Gisselquist Technology, LLC
// {{{
// This file is part of the WB2AXIP project.
//
// The WB2AXIP project contains free software and gateware, licensed under the
// Apache License, Version 2.0 (the "License"). You may not use this project,
// or this file, except in compliance with the License. You may obtain a copy
// of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
//
////////////////////////////////////////////////////////////////////////////////
//
//
`default_nettype none
// }}}
module axil2apb #(
// {{{
parameter C_AXI_ADDR_WIDTH = 32,
parameter C_AXI_DATA_WIDTH = 32,
// OPT_OUTGOING_SKIDBUFFER: required for 50% throughput
parameter [0:0] OPT_OUTGOING_SKIDBUFFER = 1'b0
// }}}
) (
// {{{
input wire S_AXI_ACLK,
input wire S_AXI_ARESETN,
//
// The AXI-lite interface
// {{{
input wire S_AXI_AWVALID,
output wire S_AXI_AWREADY,
input wire [C_AXI_ADDR_WIDTH-1:0] S_AXI_AWADDR,
input wire [2:0] S_AXI_AWPROT,
//
input wire S_AXI_WVALID,
output wire S_AXI_WREADY,
input wire [C_AXI_DATA_WIDTH-1 : 0] S_AXI_WDATA,
input wire [(C_AXI_DATA_WIDTH/8)-1:0] S_AXI_WSTRB,
//
output reg S_AXI_BVALID,
input wire S_AXI_BREADY,
output reg [1:0] S_AXI_BRESP,
//
input wire S_AXI_ARVALID,
output wire S_AXI_ARREADY,
input wire [C_AXI_ADDR_WIDTH-1:0] S_AXI_ARADDR,
input wire [2:0] S_AXI_ARPROT,
//
output reg S_AXI_RVALID,
input wire S_AXI_RREADY,
output reg [C_AXI_DATA_WIDTH-1:0] S_AXI_RDATA,
output reg [1:0] S_AXI_RRESP,
// }}}
//
// The APB interface
// {{{
output reg M_APB_PSEL,
output reg M_APB_PENABLE,
input wire M_APB_PREADY,
output reg [C_AXI_ADDR_WIDTH-1:0] M_APB_PADDR,
output reg M_APB_PWRITE,
output reg [C_AXI_DATA_WIDTH-1:0] M_APB_PWDATA,
output reg [C_AXI_DATA_WIDTH/8-1:0] M_APB_PWSTRB,
output reg [2:0] M_APB_PPROT,
input wire [C_AXI_DATA_WIDTH-1:0] M_APB_PRDATA,
input wire M_APB_PSLVERR
// }}}
// }}}
);
// Register declarations
// {{{
localparam AW = C_AXI_ADDR_WIDTH;
localparam DW = C_AXI_DATA_WIDTH;
localparam AXILLSB = $clog2(C_AXI_DATA_WIDTH)-3;
wire awskd_valid, wskd_valid, arskd_valid;
reg axil_write_ready, axil_read_ready,
write_grant, apb_idle;
wire [AW-AXILLSB-1:0] awskd_addr, arskd_addr;
wire [DW-1:0] wskd_data;
wire [DW/8-1:0] wskd_strb;
wire [2:0] awskd_prot, arskd_prot;
reg apb_bvalid, apb_rvalid, apb_error, out_skid_full;
reg [DW-1:0] apb_data;
// }}}
////////////////////////////////////////////////////////////////////////
//
// Incoming AXI-lite write interface
// {{{
////////////////////////////////////////////////////////////////////////
//
//
// awskd - write address skid buffer
// {{{
skidbuffer #(.DW(C_AXI_ADDR_WIDTH-AXILLSB + 3),
.OPT_OUTREG(0)
) awskd (.i_clk(S_AXI_ACLK), .i_reset(!S_AXI_ARESETN),
.i_valid(S_AXI_AWVALID), .o_ready(S_AXI_AWREADY),
.i_data({ S_AXI_AWADDR[AW-1:AXILLSB], S_AXI_AWPROT }),
.o_valid(awskd_valid), .i_ready(axil_write_ready),
.o_data({ awskd_addr, awskd_prot }));
// }}}
// wskd - write data skid buffer
// {{{
skidbuffer #(.DW(DW+(DW/8)),
.OPT_OUTREG(0)
) wskd (.i_clk(S_AXI_ACLK), .i_reset(!S_AXI_ARESETN),
.i_valid(S_AXI_WVALID), .o_ready(S_AXI_WREADY),
.i_data({ S_AXI_WDATA, S_AXI_WSTRB }),
.o_valid(wskd_valid), .i_ready(axil_write_ready),
.o_data({ wskd_data, wskd_strb }));
// }}}
// apb_idle
// {{{
always @(*)
begin
apb_idle = !M_APB_PSEL;// || (M_APB_PENABLE && M_APB_PREADY);
if (OPT_OUTGOING_SKIDBUFFER && (M_APB_PENABLE && M_APB_PREADY))
apb_idle = 1'b1;
end
// }}}
// axil_write_ready
// {{{
always @(*)
begin
axil_write_ready = apb_idle;
if (S_AXI_BVALID && !S_AXI_BREADY)
axil_write_ready = 1'b0;
if (!awskd_valid || !wskd_valid)
axil_write_ready = 1'b0;
if (!write_grant && arskd_valid)
axil_write_ready = 1'b0;
end
// }}}
// }}}
////////////////////////////////////////////////////////////////////////
//
// Incoming AXI-lite read interface
// {{{
////////////////////////////////////////////////////////////////////////
//
//
// arskd buffer
// {{{
skidbuffer #(.DW(C_AXI_ADDR_WIDTH-AXILLSB+3),
.OPT_OUTREG(0)
) arskd (.i_clk(S_AXI_ACLK), .i_reset(!S_AXI_ARESETN),
.i_valid(S_AXI_ARVALID), .o_ready(S_AXI_ARREADY),
.i_data({ S_AXI_ARADDR[AW-1:AXILLSB], S_AXI_ARPROT }),
.o_valid(arskd_valid), .i_ready(axil_read_ready),
.o_data({ arskd_addr, arskd_prot }));
// }}}
// axil_read_ready
// {{{
always @(*)
begin
axil_read_ready = apb_idle;
if (S_AXI_RVALID && !S_AXI_RREADY)
axil_read_ready = 1'b0;
if (write_grant && awskd_valid && wskd_valid)
axil_read_ready = 1'b0;
if (!arskd_valid)
axil_read_ready = 1'b0;
end
// }}}
// }}}
////////////////////////////////////////////////////////////////////////
//
// Arbitrate among reads and writes --- alternating arbitration
// {{{
////////////////////////////////////////////////////////////////////////
//
//
// write_grant -- alternates
// {{{
always @(posedge S_AXI_ACLK)
if (apb_idle)
begin
if (axil_write_ready)
write_grant <= 1'b0;
else if (axil_read_ready)
write_grant <= 1'b1;
end
// }}}
// }}}
////////////////////////////////////////////////////////////////////////
//
// Drive the APB bus
// {{{
////////////////////////////////////////////////////////////////////////
//
//
// APB bus
// {{{
initial M_APB_PSEL = 1'b0;
initial M_APB_PENABLE = 1'b0;
always @(posedge S_AXI_ACLK)
begin
if (apb_idle)
begin
M_APB_PSEL <= 1'b0;
if (axil_read_ready)
begin
M_APB_PSEL <= 1'b1;
M_APB_PADDR <= { arskd_addr, {(AXILLSB){1'b0}} };
M_APB_PWRITE <= 1'b0;
M_APB_PPROT <= arskd_prot;
end else if (axil_write_ready)
begin
M_APB_PSEL <= 1'b1;
M_APB_PADDR <= { awskd_addr, {(AXILLSB){1'b0}} };
M_APB_PWRITE <= 1'b1;
M_APB_PPROT <= awskd_prot;
end
if (wskd_valid)
begin
M_APB_PWDATA <= wskd_data;
M_APB_PWSTRB <= wskd_strb;
end
M_APB_PENABLE <= 1'b0;
end else if (!M_APB_PENABLE)
M_APB_PENABLE <= 1'b1;
else if (M_APB_PREADY)
begin // if (M_APB_PSEL && M_APB_ENABLE)
M_APB_PENABLE <= 1'b0;
M_APB_PSEL <= 1'b0;
end
if (!S_AXI_ARESETN)
begin
M_APB_PSEL <= 1'b0;
M_APB_PENABLE <= 1'b0;
end
end
// }}}
reg r_apb_bvalid, r_apb_rvalid, r_apb_error;
reg [DW-1:0] r_apb_data;
generate if (OPT_OUTGOING_SKIDBUFFER)
begin : GEN_OSKID
// {{{
// r_apb_bvalid, r_apb_rvalid, r_apb_error, r_apb_data
// {{{
initial r_apb_bvalid = 1'b0;
initial r_apb_rvalid = 1'b0;
always @(posedge S_AXI_ACLK)
begin
if (M_APB_PSEL && M_APB_PENABLE && M_APB_PREADY)
begin
r_apb_bvalid <= (S_AXI_BVALID && !S_AXI_BREADY) && M_APB_PWRITE;
r_apb_rvalid <= (S_AXI_RVALID && !S_AXI_RREADY) && !M_APB_PWRITE;
if (!M_APB_PWRITE)
r_apb_data <= M_APB_PRDATA;
r_apb_error <= M_APB_PSLVERR;
end else begin
if (S_AXI_BREADY)
r_apb_bvalid <= 1'b0;
if (S_AXI_RREADY)
r_apb_rvalid <= 1'b0;
end
if (!S_AXI_ARESETN)
begin
r_apb_bvalid <= 1'b0;
r_apb_rvalid <= 1'b0;
end
end
// }}}
// apb_bvalid
// {{{
always @(*)
apb_bvalid = (M_APB_PSEL && M_APB_PENABLE
&& M_APB_PREADY && M_APB_PWRITE)|| r_apb_bvalid;
// }}}
// apb_rvalid
// {{{
always @(*)
apb_rvalid = (M_APB_PSEL && M_APB_PENABLE
&& M_APB_PREADY && !M_APB_PWRITE)||r_apb_rvalid;
// }}}
// apb_data
// {{{
always @(*)
if (out_skid_full)
apb_data = r_apb_data;
else
apb_data = M_APB_PRDATA;
// }}}
// apb_error
// {{{
always @(*)
if (out_skid_full)
apb_error = r_apb_error;
else
apb_error = M_APB_PSLVERR;
// }}}
always @(*)
out_skid_full = r_apb_bvalid || r_apb_rvalid;
// }}}
end else begin : NO_OSKID
// {{{
initial r_apb_bvalid = 1'b0;
initial r_apb_rvalid = 1'b0;
initial r_apb_error = 1'b0;
initial r_apb_data = 0;
always @(*)
begin
r_apb_bvalid = 1'b0;
r_apb_rvalid = 1'b0;
r_apb_error = 1'b0;
r_apb_data = 0;
apb_bvalid = M_APB_PSEL && M_APB_PENABLE
&& M_APB_PREADY && M_APB_PWRITE;
apb_rvalid = M_APB_PSEL && M_APB_PENABLE
&& M_APB_PREADY && !M_APB_PWRITE;
apb_data = M_APB_PRDATA;
apb_error = M_APB_PSLVERR;
out_skid_full = 1'b0;
end
// Verilator lint_off UNUSED
wire skd_unused;
assign skd_unused = &{ 1'b0, r_apb_bvalid, r_apb_rvalid,
r_apb_data, r_apb_error, out_skid_full };
// Verilator lint_on UNUSED
// }}}
end endgenerate
// }}}
////////////////////////////////////////////////////////////////////////
//
// AXI-lite write return signaling
// {{{
////////////////////////////////////////////////////////////////////////
//
//
// BVALID
// {{{
initial S_AXI_BVALID = 1'b0;
always @(posedge S_AXI_ACLK)
if (!S_AXI_ARESETN)
S_AXI_BVALID <= 1'b0;
else if (!S_AXI_BVALID || S_AXI_BREADY)
S_AXI_BVALID <= apb_bvalid;
// }}}
// BRESP
// {{{
initial S_AXI_BRESP = 2'b00;
always @(posedge S_AXI_ACLK)
if (!S_AXI_ARESETN)
S_AXI_BRESP <= 2'b00;
else if (!S_AXI_BVALID || S_AXI_BREADY)
S_AXI_BRESP <= { apb_error, 1'b0 };
// }}}
// }}}
////////////////////////////////////////////////////////////////////////
//
// AXI-lite read return signaling
// {{{
////////////////////////////////////////////////////////////////////////
//
//
// RVALID
// {{{
initial S_AXI_RVALID = 1'b0;
always @(posedge S_AXI_ACLK)
if (!S_AXI_ARESETN)
S_AXI_RVALID <= 1'b0;
else if (!S_AXI_RVALID || S_AXI_RREADY)
S_AXI_RVALID <= apb_rvalid;
// }}}
// RRESP
// {{{
initial S_AXI_RRESP = 2'b00;
always @(posedge S_AXI_ACLK)
if (!S_AXI_ARESETN)
S_AXI_RRESP <= 2'b00;
else if (!S_AXI_RVALID || S_AXI_RREADY)
S_AXI_RRESP <= { apb_error, 1'b0 };
// }}}
// RDATA
// {{{
always @(posedge S_AXI_ACLK)
if ((!S_AXI_RVALID || S_AXI_RREADY) && apb_rvalid)
S_AXI_RDATA <= apb_data;
// }}}
// }}}
// Make Verilator happy
// {{{
// Verilator lint_off UNUSED
wire unused;
assign unused = &{ 1'b0, S_AXI_AWPROT, S_AXI_ARPROT,
S_AXI_AWADDR[AXILLSB-1:0], S_AXI_ARADDR[AXILLSB-1:0]
};
// Verilator lint_on UNUSED
// }}}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
// Formal properties
// {{{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
`ifdef FORMAL
localparam F_LGDEPTH = 3;
wire [F_LGDEPTH-1:0] faxi_rd_outstanding,
faxi_wr_outstanding,
faxi_awr_outstanding;
reg f_past_valid;
initial f_past_valid = 1'b0;
always @(posedge S_AXI_ACLK)
f_past_valid <= 1'b1;
////////////////////////////////////////////////////////////////////////
//
// AXI-lite interface properties
// {{{
////////////////////////////////////////////////////////////////////////
//
//
faxil_slave #(
// {{{
.C_AXI_ADDR_WIDTH(C_AXI_ADDR_WIDTH),
.C_AXI_DATA_WIDTH (C_AXI_DATA_WIDTH),
.F_OPT_COVER_BURST(4),
.F_AXI_MAXWAIT(17),
.F_AXI_MAXDELAY(17),
.F_AXI_MAXRSTALL(3),
.F_LGDEPTH(F_LGDEPTH)
// }}}
) faxil (
// {{{
.i_clk(S_AXI_ACLK), // System clock
.i_axi_reset_n(S_AXI_ARESETN),
//
.i_axi_awvalid(S_AXI_AWVALID),
.i_axi_awready(S_AXI_AWREADY),
.i_axi_awaddr(S_AXI_AWADDR),
.i_axi_awprot(S_AXI_AWPROT),
//
.i_axi_wready(S_AXI_WREADY),
.i_axi_wdata(S_AXI_WDATA),
.i_axi_wstrb(S_AXI_WSTRB),
.i_axi_wvalid(S_AXI_WVALID),
//
.i_axi_bresp(S_AXI_BRESP),
.i_axi_bvalid(S_AXI_BVALID),
.i_axi_bready(S_AXI_BREADY),
//
.i_axi_arvalid(S_AXI_ARVALID),
.i_axi_arready(S_AXI_ARREADY),
.i_axi_araddr(S_AXI_ARADDR),
.i_axi_arprot(S_AXI_ARPROT),
//
.i_axi_rvalid(S_AXI_RVALID),
.i_axi_rready(S_AXI_RREADY),
.i_axi_rresp(S_AXI_RRESP),
.i_axi_rdata(S_AXI_RDATA),
//
.f_axi_rd_outstanding(faxi_rd_outstanding),
.f_axi_wr_outstanding(faxi_wr_outstanding),
.f_axi_awr_outstanding(faxi_awr_outstanding)
// }}}
);
// Correlate outstanding counters against our state
// {{{
always @(*)
if (S_AXI_ARESETN)
begin
assert(faxi_awr_outstanding == (S_AXI_AWREADY ? 0:1)
+ (r_apb_bvalid ? 1:0)
+ (S_AXI_BVALID ? 1:0)
+ ((M_APB_PSEL && M_APB_PWRITE) ? 1:0));
assert(faxi_wr_outstanding == (S_AXI_WREADY ? 0:1)
+ (r_apb_bvalid ? 1:0)
+ (S_AXI_BVALID ? 1:0)
+ ((M_APB_PSEL && M_APB_PWRITE) ? 1:0));
assert(faxi_rd_outstanding == (S_AXI_ARREADY ? 0:1)
+ (r_apb_rvalid ? 1:0)
+ (S_AXI_RVALID ? 1:0)
+ ((M_APB_PSEL && !M_APB_PWRITE) ? 1:0));
if (r_apb_bvalid)
assert(S_AXI_BVALID);
if (r_apb_rvalid)
assert(S_AXI_RVALID);
end
// }}}
// }}}
////////////////////////////////////////////////////////////////////////
//
// APB interface properties
// {{{
////////////////////////////////////////////////////////////////////////
//
//
fapb_master #(
// {{{
.AW(C_AXI_ADDR_WIDTH),
.DW(C_AXI_DATA_WIDTH),
.F_OPT_MAXSTALL(3)
// }}}
) fapb (
// {{{
.PCLK(S_AXI_ACLK), .PRESETn(S_AXI_ARESETN),
.PSEL( M_APB_PSEL),
.PENABLE(M_APB_PENABLE),
.PREADY( M_APB_PREADY),
.PADDR( M_APB_PADDR),
.PWRITE( M_APB_PWRITE),
.PWDATA( M_APB_PWDATA),
.PWSTRB( M_APB_PWSTRB),
.PPROT( M_APB_PPROT),
.PRDATA( M_APB_PRDATA),
.PSLVERR(M_APB_PSLVERR)
// }}}
);
always @(*)
if (!M_APB_PSEL)
assert(!M_APB_PENABLE);
// }}}
////////////////////////////////////////////////////////////////////////
//
// Induction invariants
// {{{
////////////////////////////////////////////////////////////////////////
//
//
always @(*)
assert(!axil_write_ready || !axil_read_ready);
// }}}
////////////////////////////////////////////////////////////////////////
//
// Contract properties
// {{{
////////////////////////////////////////////////////////////////////////
//
//
(* anyconst *) reg f_never_test;
(* anyconst *) reg [AW-1:0] f_never_addr;
(* anyconst *) reg [DW-1:0] f_never_data;
(* anyconst *) reg [DW/8-1:0] f_never_strb;
(* anyconst *) reg [2:0] f_never_prot;
// Assume the never values are never received
// {{{
always @(*)
if (f_never_test)
begin
assume(f_never_addr[AXILLSB-1:0] == 0);
if (S_AXI_AWVALID)
begin
assume(S_AXI_AWADDR[AW-1:AXILLSB] != f_never_addr[AW-1:AXILLSB]);
assume(S_AXI_AWPROT != f_never_prot);
end
if (S_AXI_WVALID)
begin
assume(S_AXI_WDATA != f_never_data);
assume(S_AXI_WSTRB != f_never_strb);
end
if (S_AXI_ARVALID)
begin
assume(S_AXI_ARADDR[AW-1:AXILLSB] != f_never_addr[AW-1:AXILLSB]);
assume(S_AXI_ARPROT != f_never_prot);
end
if (M_APB_PSEL && M_APB_PENABLE && M_APB_PREADY&& !M_APB_PWRITE)
assume(M_APB_PRDATA != f_never_data);
end
// }}}
// Assert the never values are never in the incoming skid buffers
// {{{
always @(*)
if (f_never_test)
begin
if (awskd_valid)
begin
assert(awskd_addr != f_never_addr[AW-1:AXILLSB]);
assert(awskd_prot != f_never_prot);
end
if (wskd_valid)
begin
assert(wskd_data != f_never_data);
assert(wskd_strb != f_never_strb);
end
if (arskd_valid)
begin
assert(arskd_addr != f_never_addr[AW-1:AXILLSB]);
assert(arskd_prot != f_never_prot);
end
if (r_apb_rvalid)
assert(r_apb_data != f_never_data);
end
// }}}
// Assert the never values are never output
// {{{
always @(*)
if (f_never_test)
begin
if (M_APB_PSEL)
begin
assert(M_APB_PADDR != f_never_addr);
assert(M_APB_PPROT != f_never_prot);
if (M_APB_PWRITE)
begin
assert(M_APB_PWDATA != f_never_data);
assert(M_APB_PWSTRB != f_never_strb);
end
end
if (S_AXI_RVALID)
assert(S_AXI_RDATA != f_never_data);
end
// }}}
// }}}
////////////////////////////////////////////////////////////////////////
//
// Cover checks
// {{{
////////////////////////////////////////////////////////////////////////
//
//
// None (yet)
// }}}
////////////////////////////////////////////////////////////////////////
//
// Careless assumptions
// {{{
////////////////////////////////////////////////////////////////////////
//
//
// }}}
`endif
// }}}
endmodule