@@ -48,12 +48,13 @@ module addr_decode_dync #(
4848 // / The address decoder expects three fields in `rule_t`:
4949 // /
5050 // / typedef struct packed {
51- // / int unsigned idx;
52- // / addr_t start_addr;
53- // / addr_t end_addr;
51+ // / idx_t idx;
52+ // / addr_t start_addr;
53+ // / addr_t end_addr;
5454 // / } rule_t;
5555 // /
56- // / - `idx`: index of the rule, has to be < `NoIndices`
56+ // / - `idx`: The index to be returned for a matching rule. Usually an integer but can
57+ // / be any type of data.
5758 // / - `start_addr`: start address of the range the rule describes, value is included in range
5859 // / - `end_addr`: end address of the range the rule describes, value is NOT included in range
5960 // / if `end_addr == '0` end of address space is assumed
@@ -62,15 +63,12 @@ module addr_decode_dync #(
6263 // / power of two (NAPOT) region instead of an address range: `start_addr` becomes the base address
6364 // / and `end_addr` the mask. See the wrapping module `addr_decode_napot` for details.
6465 parameter type rule_t = logic ,
65- // Whether this is a NAPOT (base and mask) or regular range decoder
66+ // / Whether this is a NAPOT (base and mask) or regular range decoder
6667 parameter bit Napot = 0 ,
67- // / Dependent parameter, do **not** overwite!
68- // /
69- // / Width of the `idx_o` output port .
68+ // / The output index type `idx_t` can be specified either with the width `IdxWidth`
69+ // / or directly with the type `idx_t`. By default, it will use the maximum index
70+ // / `NoIndices` to calculate the required width .
7071 parameter int unsigned IdxWidth = cf_math_pkg :: idx_width(NoIndices),
71- // / Dependent parameter, do **not** overwite!
72- // /
73- // / Type of the `idx_o` output port.
7472 parameter type idx_t = logic [IdxWidth- 1 : 0 ]
7573) (
7674 // / Address to decode.
@@ -130,7 +128,6 @@ module addr_decode_dync #(
130128 $sformatf (" Input address has %d bits and address map has %d bits." ,
131129 $bits (addr_i), $bits (addr_map_i[0 ].start_addr)))
132130 `ASSUME_I (norules_0, NoRules > 0 , $sformatf (" At least one rule needed" ))
133- `ASSUME_I (noindices_0, NoIndices > 0 , $sformatf (" At least one index needed" ))
134131 end
135132
136133 `ASSERT_FINAL (more_than_1_bit_set, $onehot0 (matched_rules) || config_ongoing_i,
@@ -155,15 +152,6 @@ module addr_decode_dync #(
155152 Rule> IDX: %h START: %h END: %h \n \
156153 #####################################################" ,
157154 i ,addr_map_i[i].idx, addr_map_i[i].start_addr, addr_map_i[i].end_addr))
158- // check the SLV ids
159- `ASSUME_I (check_idx, addr_map_i[i].idx < NoIndices,
160- $sformatf (" This rule has a IDX that is not allowed!!!\n \
161- Violating rule %d .\n \
162- Rule> IDX: %h START: %h END: %h \n \
163- Rule> MAX_IDX: %h \n \
164- #####################################################" ,
165- i, addr_map_i[i].idx, addr_map_i[i].start_addr, addr_map_i[i].end_addr,
166- (NoIndices- 1 )))
167155 for (int unsigned j = i + 1 ; j < NoRules; j++ ) begin
168156 // overlap check
169157 `ASSUME_I (check_overlap, Napot ||
0 commit comments