1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-03-12 21:24:09 +00:00

core: Implement PVR register

Microwatt has been allocated a PVR version of 0x0063. Implement a PVR
with this value.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
This commit is contained in:
Jordan Niethe
2020-07-07 20:37:52 +10:00
parent ce0205b262
commit 17fc77cef2
2 changed files with 6 additions and 0 deletions

View File

@@ -6,6 +6,8 @@ library work;
use work.decode_types.all;
package common is
-- Processor Version Number
constant PVR_MICROWATT : std_ulogic_vector(31 downto 0) := x"00630000";
-- MSR bit numbers
constant MSR_SF : integer := (63 - 0); -- Sixty-Four bit mode
@@ -43,6 +45,7 @@ package common is
constant SPR_HSPRG1 : spr_num_t := 305;
constant SPR_PID : spr_num_t := 48;
constant SPR_PRTBL : spr_num_t := 720;
constant SPR_PVR : spr_num_t := 287;
-- GPR indices in the register file (GPR only)
subtype gpr_index_t is std_ulogic_vector(4 downto 0);

View File

@@ -766,6 +766,9 @@ begin
spr_val := ctrl.dec;
when SPR_CFAR =>
spr_val := ctrl.cfar;
when SPR_PVR =>
spr_val(63 downto 32) := (others => '0');
spr_val(31 downto 0) := PVR_MICROWATT;
when 724 => -- LOG_ADDR SPR
spr_val := log_wr_addr & r.log_addr_spr;
when 725 => -- LOG_DATA SPR