Skip to content

Commit 138a69a

Browse files
committed
Bump common_cells to v2
1 parent 97a1dd2 commit 138a69a

5 files changed

Lines changed: 47 additions & 55 deletions

File tree

Bender.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package:
44

55
dependencies:
66
axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.39.9 }
7-
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.39.0 }
7+
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", rev: v2-dev }
88
common_verification: { git: "https://github.com/pulp-platform/common_verification.git", version: 0.2.1 }
99

1010
sources:

src/axi_res_tbl.sv

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,21 @@ module axi_res_tbl #(
8282
logic [NUM_RESERVATIONS-1:0][AXI_ADDR_WIDTH-1:0] tbl_d, tbl_q;
8383
logic clr, set, match, matching_set;
8484
logic [NUM_RESERVATIONS-1:0] plru_used, plru_evict_oh;
85-
logic [cf_math_pkg::idx_width(NUM_RESERVATIONS)-1:0] plru_evict;
85+
logic [cc_pkg::idx_width(NUM_RESERVATIONS)-1:0] plru_evict;
8686
logic [NUM_RESERVATIONS-1:0][AXI_ID_WIDTH-1:0] tbl_id_d, tbl_id_q;
8787
logic [NUM_RESERVATIONS-1:0] field_in_use_d, field_in_use_q;
8888

89-
plru_tree #(
90-
.ENTRIES(NUM_RESERVATIONS)
89+
cc_plru_tree #(
90+
.Entries(NUM_RESERVATIONS)
9191
) i_reservation_plru (
9292
.clk_i(clk_i),
9393
.rst_ni(rst_ni),
9494
.used_i(plru_used),
9595
.plru_o(plru_evict_oh)
9696
);
9797

98-
onehot_to_bin #(
99-
.ONEHOT_WIDTH(NUM_RESERVATIONS)
98+
cc_onehot_to_bin #(
99+
.OnehotWidth(NUM_RESERVATIONS)
100100
) i_reservation_plru_bin (
101101
.onehot(plru_evict_oh),
102102
.bin(plru_evict)

src/axi_riscv_lrsc.sv

Lines changed: 41 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,12 @@ module axi_riscv_lrsc #(
335335
// AR and R Channel
336336

337337
// IQ Queue to track in-flight reads
338-
id_queue #(
339-
.ID_WIDTH (AXI_ID_WIDTH),
340-
.CAPACITY (AXI_MAX_READ_TXNS),
341-
.data_t (r_flight_t),
342-
.FULL_BW (FULL_BANDWIDTH),
343-
.CUT_OUP_POP_INP_GNT (CUT_OUP_POP_INP_GNT)
338+
cc_id_queue #(
339+
.IdWidth (AXI_ID_WIDTH),
340+
.Capacity (AXI_MAX_READ_TXNS),
341+
.data_t (r_flight_t),
342+
.FullBw (FULL_BANDWIDTH),
343+
.CutOupPopInpGnt (CUT_OUP_POP_INP_GNT)
344344
) i_read_in_flight_queue (
345345
.clk_i (clk_i),
346346
.rst_ni (rst_ni),
@@ -365,8 +365,8 @@ module axi_riscv_lrsc #(
365365
assign rifq_inp_data.excl = ar_push_excl;
366366

367367
// Fork requests from AR into reservation table and queue of in-flight reads.
368-
stream_fork #(
369-
.N_OUP (2)
368+
cc_stream_fork #(
369+
.NumOup (2)
370370
) i_ar_push_fork (
371371
.clk_i (clk_i),
372372
.rst_ni (rst_ni),
@@ -376,7 +376,7 @@ module axi_riscv_lrsc #(
376376
.ready_i ({art_filter_ready, rifq_inp_gnt})
377377
);
378378

379-
stream_filter i_art_filter (
379+
cc_stream_filter i_art_filter (
380380
.valid_i (art_filter_valid),
381381
.ready_o (art_filter_ready),
382382
.drop_i (!ar_push_res),
@@ -496,16 +496,15 @@ module axi_riscv_lrsc #(
496496
// AW, W and B Channel
497497

498498
// FIFO to track commands for W bursts.
499-
fifo_v3 #(
500-
.FALL_THROUGH (1'b0), // There would be a combinatorial loop if this were a fall-through
501-
// register. Optimizing this can reduce the latency of this module.
502-
.dtype (w_cmd_t),
503-
.DEPTH (AXI_MAX_WRITE_TXNS)
499+
cc_fifo #(
500+
.FallThrough(1'b0), // There would be a combinatorial loop if this were a fall-through
501+
// register. Optimizing this can reduce the latency of this module.
502+
.data_t (w_cmd_t),
503+
.Depth (AXI_MAX_WRITE_TXNS)
504504
) i_w_cmd_fifo (
505505
.clk_i (clk_i),
506506
.rst_ni (rst_ni),
507507
.flush_i (1'b0),
508-
.testmode_i (1'b0),
509508
.full_o (w_cmd_full),
510509
.empty_o (w_cmd_empty),
511510
.usage_o (),
@@ -522,12 +521,12 @@ module axi_riscv_lrsc #(
522521
typedef logic [$bits(b_cmd_t)-1:0] b_cmd_flat_t;
523522
b_cmd_flat_t b_status_inp_cmd_flat, b_status_oup_cmd_flat;
524523
assign b_status_inp_cmd_flat = b_cmd_flat_t'(b_status_inp_cmd);
525-
id_queue #(
526-
.ID_WIDTH (AXI_ID_WIDTH),
527-
.CAPACITY (AXI_MAX_WRITE_TXNS),
528-
.data_t (b_cmd_flat_t),
529-
.FULL_BW (FULL_BANDWIDTH),
530-
.CUT_OUP_POP_INP_GNT (CUT_OUP_POP_INP_GNT)
524+
cc_id_queue #(
525+
.IdWidth (AXI_ID_WIDTH),
526+
.Capacity (AXI_MAX_WRITE_TXNS),
527+
.data_t (b_cmd_flat_t),
528+
.FullBw (FULL_BANDWIDTH),
529+
.CutOupPopInpGnt (CUT_OUP_POP_INP_GNT)
531530
) i_b_status_queue (
532531
.clk_i (clk_i),
533532
.rst_ni (rst_ni),
@@ -552,12 +551,12 @@ module axi_riscv_lrsc #(
552551
assign b_status_oup_cmd = b_cmd_t'(b_status_oup_cmd_flat);
553552

554553
// ID Queue to track in-flight writes.
555-
id_queue #(
556-
.ID_WIDTH (AXI_ID_WIDTH),
557-
.CAPACITY (AXI_MAX_WRITE_TXNS),
558-
.data_t (w_flight_t),
559-
.FULL_BW (FULL_BANDWIDTH),
560-
.CUT_OUP_POP_INP_GNT (CUT_OUP_POP_INP_GNT)
554+
cc_id_queue #(
555+
.IdWidth (AXI_ID_WIDTH),
556+
.Capacity (AXI_MAX_WRITE_TXNS),
557+
.data_t (w_flight_t),
558+
.FullBw (FULL_BANDWIDTH),
559+
.CutOupPopInpGnt (CUT_OUP_POP_INP_GNT)
561560
) i_write_in_flight_queue (
562561
.clk_i (clk_i),
563562
.rst_ni (rst_ni),
@@ -593,9 +592,9 @@ module axi_riscv_lrsc #(
593592
end
594593
// pragma translate_on
595594

596-
stream_arbiter #(
597-
.DATA_T (wifq_exists_t),
598-
.N_INP (2)
595+
cc_stream_arbiter #(
596+
.data_t (wifq_exists_t),
597+
.NumInp (2)
599598
) i_wifq_exists_arb (
600599
.clk_i (clk_i),
601600
.rst_ni (rst_ni),
@@ -607,8 +606,8 @@ module axi_riscv_lrsc #(
607606
.oup_ready_i (wifq_exists_gnt)
608607
);
609608

610-
stream_fork #(
611-
.N_OUP (2)
609+
cc_stream_fork #(
610+
.NumOup (2)
612611
) i_mst_b_fork (
613612
.clk_i (clk_i),
614613
.rst_ni (rst_ni),
@@ -619,15 +618,14 @@ module axi_riscv_lrsc #(
619618
);
620619

621620
// FIFO to track B responses that are to be injected.
622-
fifo_v3 #(
623-
.FALL_THROUGH (1'b0),
624-
.dtype (b_inj_t),
625-
.DEPTH (AXI_MAX_WRITE_TXNS)
621+
cc_fifo #(
622+
.FallThrough (1'b0),
623+
.data_t (b_inj_t),
624+
.Depth (AXI_MAX_WRITE_TXNS)
626625
) i_b_inj_fifo (
627626
.clk_i (clk_i),
628627
.rst_ni (rst_ni),
629628
.flush_i (1'b0),
630-
.testmode_i (1'b0),
631629
.full_o (b_inj_full),
632630
.empty_o (b_inj_empty),
633631
.usage_o (),
@@ -662,13 +660,12 @@ module axi_riscv_lrsc #(
662660
mst_aw_user_o} = mst_aw;
663661

664662

665-
fall_through_register #(
666-
.T (aw_chan_t)
663+
cc_fall_through_register #(
664+
.data_t (aw_chan_t)
667665
) i_aw_trans_reg (
668666
.clk_i (clk_i),
669667
.rst_ni (rst_ni),
670668
.clr_i (1'b0),
671-
.testmode_i (1'b0),
672669
// Input
673670
.valid_i (mst_aw_valid),
674671
.ready_o (mst_aw_ready),
@@ -988,13 +985,12 @@ module axi_riscv_lrsc #(
988985
assign b_status_oup_pop = slv_b_valid && slv_b_ready;
989986

990987
// Register in front of slv_b to prevent changes by FSM while valid and not yet ready.
991-
stream_register #(
992-
.T (b_chan_t)
988+
cc_stream_register #(
989+
.data_t (b_chan_t)
993990
) slv_b_reg (
994991
.clk_i (clk_i),
995992
.rst_ni (rst_ni),
996993
.clr_i (1'b0),
997-
.testmode_i (1'b0),
998994

999995
.valid_i (slv_b_valid),
1000996
.ready_o (slv_b_ready),
@@ -1006,9 +1002,9 @@ module axi_riscv_lrsc #(
10061002
);
10071003

10081004
// Fall-through register in front of slv_r to remove mutual dependency.
1009-
spill_register #( // There would be a combinatorial loop if this were a fall-through register.
1005+
cc_spill_register #( // There would be a combinatorial loop if this were a fall-through register.
10101006
// Optimizing this can reduce the latency of this module.
1011-
.T (r_chan_t)
1007+
.data_t (r_chan_t)
10121008
) slv_r_reg (
10131009
.clk_i (clk_i),
10141010
.rst_ni (rst_ni),

test/axi_riscv_atomics_tb.sv

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ module automatic axi_riscv_atomics_tb;
136136
) i_axi_mux (
137137
.clk_i ( clk ),
138138
.rst_ni ( rst_n ),
139-
.test_i ( 1'b0 ),
140139
.slv ( axi_cl ),
141140
.mst ( axi_iwc )
142141
);
@@ -258,7 +257,6 @@ module automatic axi_riscv_atomics_tb;
258257
test_all_amos();
259258
test_same_address();
260259
test_amo_write_consistency();
261-
// test_interleaving(); // Only works on old memory controller
262260
test_atomic_counter();
263261
random_amo();
264262

test/axi_riscv_atomics_tb_wave.do

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,6 @@ add wave -noupdate -group {LRSC Adapter} -group mst /axi_riscv_atomics_tb/i_axi_
515515
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/clk_i
516516
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/rst_ni
517517
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/clr_i
518-
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/testmode_i
519518
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/valid_i
520519
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/ready_o
521520
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/data_i
@@ -527,7 +526,6 @@ add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo /axi_ri
527526
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo -expand -group FIFO /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/i_fifo/i_fifo_v3/clk_i
528527
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo -expand -group FIFO /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/i_fifo/i_fifo_v3/rst_ni
529528
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo -expand -group FIFO /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/i_fifo/i_fifo_v3/flush_i
530-
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo -expand -group FIFO /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/i_fifo/i_fifo_v3/testmode_i
531529
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo -expand -group FIFO /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/i_fifo/i_fifo_v3/full_o
532530
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo -expand -group FIFO /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/i_fifo/i_fifo_v3/empty_o
533531
add wave -noupdate -group {LRSC Adapter} -group mst -group aw_trans_fifo -expand -group FIFO /axi_riscv_atomics_tb/i_axi_atomic_adapter/i_atomics/i_lrsc/i_aw_trans_reg/i_fifo/i_fifo_v3/usage_o

0 commit comments

Comments
 (0)