-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hak-maint-tcam2_ver' into 'devel'
TCAM: [MAINTENANCE] Refactor TCAM2 and MVB_TCAM components See merge request ndk/ndk-fpga!75
- Loading branch information
Showing
29 changed files
with
243 additions
and
818 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Modules.tcl: Local include tcl script | ||
# Copyright (C) 2024 CESNET z. s. p. o. | ||
# Author: Tomas Hak <[email protected]> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
set SV_COMMON_BASE "$OFM_PATH/comp/ver" | ||
set SV_MVB_BASE "$OFM_PATH/comp/mvb_tools/ver" | ||
|
||
lappend COMPONENTS [ list "SV_COMMON" $SV_COMMON_BASE "FULL" ] | ||
lappend COMPONENTS [ list "SV_MVB" $SV_MVB_BASE "FULL" ] | ||
|
||
lappend MOD "$ENTITY_BASE/sv_rb_pkg.sv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// rb_transaction.sv: Read Bus transaction | ||
// Copyright (C) 2024 CESNET z. s. p. o. | ||
// Author: Tomas Hak <[email protected]> | ||
// | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
class RbTransaction #(ADDR_WIDTH = 8, FRAGMENTED_MEM = FALSE, ITEMS = 2**ADDR_WIDTH, BLOCK_ITEMS = 20) extends MvbTransaction#(.ITEM_WIDTH(ADDR_WIDTH)); | ||
constraint mem_items_constr { data < ITEMS; } | ||
// in fragmented mode top BLOCK addresses are not used | ||
constraint frag_mem_constr { !FRAGMENTED_MEM || data[$clog2(BLOCK_ITEMS)-1 : 0] < BLOCK_ITEMS; } | ||
|
||
virtual function Transaction copy(Transaction to = null); | ||
RbTransaction #(ADDR_WIDTH, FRAGMENTED_MEM, ITEMS, BLOCK_ITEMS) tr; | ||
if (to == null) | ||
tr = new(); | ||
else | ||
$cast(tr, to); | ||
copy = super.copy(tr); | ||
endfunction | ||
|
||
endclass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// sv_rb_pkg.sv: SystemVerilog package with Read Bus | ||
// Copyright (C) 2024 CESNET z. s. p. o. | ||
// Author: Tomas Hak <[email protected]> | ||
// | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
package sv_rb_pkg; | ||
|
||
import sv_common_pkg::*; | ||
import sv_mvb_pkg::*; | ||
|
||
`include "rb_transaction.sv" | ||
|
||
endpackage |
Oops, something went wrong.