diff --git a/common.vhdl b/common.vhdl index 18378d5..a193df1 100644 --- a/common.vhdl +++ b/common.vhdl @@ -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); diff --git a/execute1.vhdl b/execute1.vhdl index a1cd008..3b2007a 100644 --- a/execute1.vhdl +++ b/execute1.vhdl @@ -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