Skip to content

Commit

Permalink
Do not waste address space on generic regs if unused
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoConti committed Sep 10, 2020
1 parent f262cb1 commit 9323a2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rtl/hwpe_ctrl_regfile.sv
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ module hwpe_ctrl_regfile
localparam int unsigned N_REGISTERS = REGFILE_N_REGISTERS;
localparam int unsigned N_MANDATORY_REGS = REGFILE_N_MANDATORY_REGS;
localparam int unsigned N_RESERVED_REGS = REGFILE_N_RESERVED_REGS;
localparam int unsigned N_MAX_IO_REGS = REGFILE_N_MAX_IO_REGS;
localparam int unsigned N_MAX_GENERIC_REGS = REGFILE_N_MAX_GENERIC_REGS;
localparam int unsigned N_MAX_IO_REGS = 2**$clog2(N_IO_REGS-1);
localparam int unsigned N_MAX_GENERIC_REGS = 2**$clog2(N_GENERIC_REGS-1);
localparam int unsigned LOG_REGS = $clog2(N_REGISTERS);
localparam int unsigned LOG_REGS_MC = LOG_REGS+LOG_CONTEXT;

Expand Down
4 changes: 2 additions & 2 deletions rtl/hwpe_ctrl_slave.sv
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ module hwpe_ctrl_slave
localparam int unsigned LOG_REGS = $clog2(N_REGISTERS);
localparam int unsigned LOG_CONTEXT = N_CONTEXT > 1 ? $clog2(N_CONTEXT) : 1;
localparam int unsigned LOG_REGS_MC = LOG_REGS+LOG_CONTEXT;
localparam int unsigned N_MAX_IO_REGS = REGFILE_N_MAX_IO_REGS;
localparam int unsigned N_MAX_GENERIC_REGS = REGFILE_N_MAX_GENERIC_REGS;
localparam int unsigned N_MAX_IO_REGS = 2**$clog2(N_IO_REGS-1);
localparam int unsigned N_MAX_GENERIC_REGS = 2**$clog2(N_GENERIC_REGS-1);

regfile_in_t regfile_in;
regfile_out_t regfile_out;
Expand Down

0 comments on commit 9323a2a

Please sign in to comment.