Skip to content

Commit 3690a3c

Browse files
Moritz SchererFrancescoConti
authored andcommitted
Fixup for VCS compatibility
1 parent 7ba707d commit 3690a3c

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

Bender.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: hwpe-ctrl
3-
authors:
3+
authors:
44
- "Francesco Conti <f.conti@unibo.it>"
55

66
dependencies:
@@ -14,8 +14,8 @@ sources:
1414
# package. Files in level 1 only depend on files in level 0, files in level 2 on files in
1515
# levels 1 and 0, etc. Files within a level are ordered alphabetically.
1616
# Level 0
17-
- rtl/hwpe_ctrl_interfaces.sv
1817
- rtl/hwpe_ctrl_package.sv
18+
- rtl/hwpe_ctrl_interfaces.sv
1919
# Level 1
2020
- rtl/hwpe_ctrl_regfile_ff.sv
2121
- rtl/hwpe_ctrl_regfile_latch.sv

rtl/hwpe_ctrl_interfaces.sv

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
* specific language governing permissions and limitations under the License.
1414
*/
1515

16-
interface hwpe_ctrl_intf_periph (
16+
interface hwpe_ctrl_intf_periph
17+
import hwpe_ctrl_package::*;
18+
(
1719
input logic clk
1820
);
1921

20-
parameter int unsigned ID_WIDTH = -1;
22+
parameter int unsigned ID_WIDTH = 0;
2123

2224
logic req;
2325
logic gnt;

rtl/hwpe_ctrl_package.sv

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515

1616
package hwpe_ctrl_package;
1717

18-
parameter int unsigned REGFILE_N_MAX_CORES = 16;
19-
parameter int unsigned REGFILE_N_MAX_CONTEXT = 8;
20-
parameter int unsigned REGFILE_N_DEFAULT_CONTEXT = 2;
21-
parameter int unsigned REGFILE_N_EVT = 2;
22-
parameter int unsigned REGFILE_N_REGISTERS = 64;
23-
parameter int unsigned REGFILE_N_MANDATORY_REGS = 8;
24-
parameter int unsigned REGFILE_N_MAX_IO_REGS = 48;
18+
// Return either the argument minus 1 or 0 if 0; useful for IO vector width declaration
19+
function automatic integer unsigned iomsb(input integer unsigned width);
20+
return (width != 32'd0) ? unsigned'(width - 1) : 32'd0;
21+
endfunction
22+
23+
parameter int unsigned REGFILE_N_MAX_CORES = 16;
24+
parameter int unsigned REGFILE_N_MAX_CONTEXT = 8;
25+
parameter int unsigned REGFILE_N_DEFAULT_CONTEXT = 2;
26+
parameter int unsigned REGFILE_N_EVT = 2;
27+
parameter int unsigned REGFILE_N_REGISTERS = 64;
28+
parameter int unsigned REGFILE_N_MANDATORY_REGS = 8;
29+
parameter int unsigned REGFILE_N_MAX_IO_REGS = 48;
2530
parameter int unsigned REGFILE_N_MAX_GENERIC_REGS = 8;
2631
parameter int unsigned REGFILE_N_RESERVED_REGS = REGFILE_N_REGISTERS-REGFILE_N_MANDATORY_REGS-REGFILE_N_MAX_GENERIC_REGS-REGFILE_N_MAX_IO_REGS;
2732

0 commit comments

Comments
 (0)